码迷,mamicode.com
首页 > 数据库 > 详细

【转】安装mysql 出现:Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

时间:2015-07-08 17:56:02      阅读:271      评论:0      收藏:0      [点我收藏+]

标签:

来源: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

【转】安装mysql 出现:Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

标签:

原文地址:http://www.cnblogs.com/suan07lai/p/4630611.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!