來源:http://blog.csdn.net/dapeng0112/article/details/37053407
本來初始化配置是這樣的:
scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql
出現了
[root@localhost mysql-5.6.14]# service mysql restart
ERROR! MySQL server PID file could not be found!
Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).
在日志中出現了如下錯誤:
Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
后來采用了下面的語句就可以了:
scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --ldata=/var/lib/mysql
