[ERROR] Can't open the mysql.plugin table


centos7下的mysql 5.7.17,执行命令启动数据库的时候报错:

systemctl start mysqld.service

  1. 2017-11-03T19:08:28.363912+08:00 0 [Note] /usr/sbin/mysqld (mysqld 5.7.17-log) starting as process 21010 ...
  2. 2017-11-03T19:08:28.367804+08:00 0 [Note] InnoDB: PUNCH HOLE support available
  3. 2017-11-03T19:08:28.367836+08:00 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  4. 2017-11-03T19:08:28.367844+08:00 0 [Note] InnoDB: Uses event mutexes
  5. 2017-11-03T19:08:28.367849+08:00 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
  6. 2017-11-03T19:08:28.367853+08:00 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
  7. 2017-11-03T19:08:28.367859+08:00 0 [Note] InnoDB: Using Linux native AIO
  8. 2017-11-03T19:08:28.367878+08:00 0 [Note] InnoDB: Adjusting innodb_buffer_pool_instances from 8 to 1 since innodb_buffer_pool_size is less than 1024 MiB
  9. 2017-11-03T19:08:28.368450+08:00 0 [Note] InnoDB: Number of pools: 1
  10. 2017-11-03T19:08:28.368574+08:00 0 [Note] InnoDB: Using CPU crc32 instructions
  11. 2017-11-03T19:08:28.370795+08:00 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
  12. 2017-11-03T19:08:28.386993+08:00 0 [Note] InnoDB: Completed initialization of buffer pool
  13. 2017-11-03T19:08:28.390005+08:00 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
  14. 2017-11-03T19:08:28.423716+08:00 0 [Note] InnoDB: Highest supported file format is Barracuda.
  15. 2017-11-03T19:08:28.532555+08:00 0 [Note] InnoDB: Creating shared tablespace for temporary tables
  16. 2017-11-03T19:08:28.532627+08:00 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
  17. 2017-11-03T19:08:28.630549+08:00 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
  18. 2017-11-03T19:08:28.631466+08:00 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
  19. 2017-11-03T19:08:28.631483+08:00 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
  20. 2017-11-03T19:08:28.632485+08:00 0 [Note] InnoDB: Waiting for purge to start
  21. 2017-11-03T19:08:28.683674+08:00 0 [Note] InnoDB: 5.7.17 started; log sequence number 1210395
  22. 2017-11-03T19:08:28.684392+08:00 0 [Note] InnoDB: Loading buffer pool(s) from /alidata1/mysql/data/ib_buffer_pool
  23. 2017-11-03T19:08:28.684694+08:00 0 [Note] Plugin 'FEDERATED' is disabled.
  24. mysqld: Table 'mysql.plugin' doesn't exist
  25. 2017-11-03T19:08:28.684846+08:00 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
  26. 2017-11-03T19:08:28.688758+08:00 0 [Note] InnoDB: Buffer pool(s) load completed at 171103 19:08:28
  27. 2017-11-03T19:08:28.692784+08:00 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
  28. 2017-11-03T19:08:28.696746+08:00 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
  29. 2017-11-03T19:08:28.696945+08:00 0 [Warning] CA certificate ca.pem is self signed.
  30. 2017-11-03T19:08:28.698203+08:00 0 [Note] Server hostname (bind-address): '192.168.2.71'; port: 3306
  31. 2017-11-03T19:08:28.698235+08:00 0 [Note] - '192.168.2.71' resolves to '192.168.2.71';
  32. 2017-11-03T19:08:28.698270+08:00 0 [Note] Server socket created on IP: '192.168.2.71'.
  33. 2017-11-03T19:08:28.701031+08:00 0 [Warning] Failed to open optimizer cost constant tables

  34. 2017-11-03T19:08:28.701146+08:00 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
  35. 2017-11-03T19:08:28.701186+08:00 0 [ERROR] Aborting

解决办法是:先初始化出来一个数据库,datadir和my.cnf里的一致


  1. mysqld --initialize --datadir=/alidata1/mysql/data




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

转载于:http://blog.itpub.net/20893244/viewspace-2146811/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值