开发者社区> 问答> 正文

mysql运行时报错,“Can't open the mysql.plugin table”

160424 14:14:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: Initializing buffer pool, size = 8.0M
InnoDB: Completed initialization of buffer pool
InnoDB: Started; log sequence number 0 43655
[ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
[ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50095, now running 50158. Please use mysql_upgrade to fix this error.
[ERROR] mysql.user has no Event_priv column at position 29
[ERROR] Cannot open mysql.event
[ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
[Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.58' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Utter Ramblings

我是个mysql新手,在网上找了很久
解决方法是:在运行初始化权限表的时候使用增加参数--datadir ,命令格式为:
shell> ..../mysql_install_db --user=mysql --datadir=/usr/local/mysql/var
但是我运行的出错。请大家帮帮小弟,谢谢啦

展开
收起
落地花开啦 2016-02-26 18:09:08 16036 0
1 条回答
写回答
取消 提交回答
  • 喜欢技术,喜欢努力的人

    查看一下配置文件
    mysql_install_db --user=mysql --ldata=/var/lib/mysql/

    2019-07-17 18:48:36
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载

相关镜像