首页 > 数据库技术 > 详细

启动mysql问题Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

时间:2015-06-19 21:44:50      阅读:514      评论:0      收藏:0      [点我收藏+]

启动mysql出现问题

/etc/init.d/mysqld start


MySQL server PID file could not be found![FAILED]

Starting MySQL......................................The server quit without updating PID file (/data/mysql/mysql_3306/data/mysql.pid).[FAILED]


查看错误日志

150619 15:57:19 [Note] Server socket created on IP: ‘0.0.0.0‘.

150619 15:57:19 [ERROR] Fatal error: Can‘t open and lock privilege tables: Table ‘mysql.host‘ doesn‘t exist



原因:

./scripts/mysql_install_db --user=mysql --defaults-file=/etc/my.cnf 

该步骤(初始化数据库)中my.cnf用的是默认的

而启动时用的是最新的


解决方法:

用最新的配置文件进行初始化

cd /usr/local/mysql/

./scripts/mysql_install_db --user=mysql --defaults-file=/etc/my.cnf 


启动没有问题


本文出自 “dba天空” 博客,请务必保留此出处http://9425473.blog.51cto.com/9415473/1663591

启动mysql问题Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

原文:http://9425473.blog.51cto.com/9415473/1663591

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!