MySQL 启动报错 Table 'mysql.plugin' doesn't exist

启动报错:

点击(此处)折叠或打开

  1. /opt/szy/bin/mysqld: Table \'mysql.plugin\' doesn\'t exist
  2. 141211 15:06:12 [ERROR] Can\'t open the mysql.plugin table. Please run mysql_upgrade to create it.
  3. 141211 15:06:14 [ERROR] Fatal error: Can\'t open and lock privilege tables: Table \'mysql.host\' doesn\'t exist
  4. 141211 15:06:14 mysqld_safe mysqld from pid file /opt/szy/data/mysqldevdb03.pid ended

 
问题分析:
               百度了下,发现这是执行scripts/mysql_install_db --user=mysql没有成功的原因,没有一个初始化数据库,不能启动mysql守护进程
解决办法:
               执行如下语句,szy为实例名
               ./scripts/mysql_install_db --user= szy  --basedir=/opt/szy/ --datadir=/opt/szy/data/

重启启动,OK!


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29071259/viewspace-1368508/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29071259/viewspace-1368508/

你可能感兴趣的:(MySQL 启动报错 Table 'mysql.plugin' doesn't exist)