Created
July 18, 2018 20:33
-
-
Save blackandred/20251fc19db3045a79a265b828bee404 to your computer and use it in GitHub Desktop.
Docker + MySQL 5.1 problem solution: "[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host'" "docker"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ ! -f /var/lib/mysql/ibdata1 ]]; then | |
cd /usr/local/mysql/ | |
mysql_install_db --user=mysql --ldata=/var/lib/mysql | |
fi | |
echo " >> Starting MySQL from /var/lib/mysql" | |
exec mysqld --datadir=/var/lib/mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment