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

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

时间:2015-06-19 21:45:00      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:mysql

启动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

标签:mysql

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

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