提示:如果是生产环境或有重要数据,请在操作前务必做好数据备份或快照,以免数据丢失。
报错:
解决方法:2024-07-08 14:45:20 3070 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
2024-07-08 14:45:20 3070 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2024-07-08 14:45:20 3070 [Note] InnoDB: Using atomics to ref count buffer pool pages
2024-07-08 14:45:20 3070 [Note] InnoDB: The InnoDB memory heap is disabled
2024-07-08 14:45:20 3070 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2024-07-08 14:45:20 3070 [Note] InnoDB: Memory barrier is not used
2024-07-08 14:45:20 3070 [Note] InnoDB: Compressed tables use zlib 1.2.11
2024-07-08 14:45:20 3070 [Note] InnoDB: Using Linux native AIO
2024-07-08 14:45:20 3070 [Note] InnoDB: Using CPU crc32 instructions
2024-07-08 14:45:20 3070 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2024-07-08 14:45:20 3070 [Note] InnoDB: Completed initialization of buffer pool
2024-07-08 14:45:20 3070 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2024-07-08 14:45:20 3070 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
根据 error 中的提示 我们可以使用 mysql_upgrade 来修复问题:
执行如下命令修复:
出现如图则表示正常。mysql_install_db --user=mysql
最后再启动mysql即可。问题很简单,留个记号防止忘记。
文章评论 本文章有个评论