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

linux mysql启动报错Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

时间:2015-05-07 00:38:00      阅读:244      评论:0      收藏:0      [点我收藏+]

标签:

vi /etc/my.cnf  查看日志文件路径:

log-error=/var/log/mysqld.log

查看报错日志:

之前的服务器被别人拿了,所以自己买了台美国vps,根据笔记安装完启动mysql,又启动不了。 
查看了错误日志 

引用
090321 18:55:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data 
/usr/local/mysql/libexec/mysqld: Table ‘mysql.plugin‘ doesn‘t exist 
090321 18:55:03 [ERROR] Can‘t open the mysql.plugin table. Please run mysql_upgrade to create it. 
090321 18:55:03  InnoDB: Started; log sequence number 0 46409 
090321 18:55:03 [Note] Recovering after a crash using mysql-bin 
090321 18:55:03 [Note] Starting crash recovery... 
090321 18:55:03 [Note] Crash recovery finished. 
090321 18:55:03 [ERROR] Fatal error: Can‘t open and lock privilege tables: Table ‘mysql.host‘ doesn‘t exist 
090321 18:55:03 mysqld_safe mysqld from pid file /usr/local/mysql/data/srv.willko.cn.pid ended


这主要是因为安装时权限的问题,导致安装失败了。。我汗,怎么安装时候没提示呢。。 
修改mysql下的data目录的权限chown -R mysql:mysql /data/mysql(datadir=/data/mysql),然后再执行mysql_install_db就好了

执行授权:

 

linux mysql启动报错Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

标签:

原文地址:http://www.cnblogs.com/actorai/p/4483469.html

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