恢复后如何使MySQL 8正确启动

时间:2020-10-23 17:51:53

标签: mysql

在mac 10.15上,MySQL 8.0.22的安装可以正常运行(Oracle)。但是,从备份重新安装数据后,重启后MySQL将拒绝启动。最初没事。我可以看到所有数据并与之交互,但是一旦我重新启动,MySQL就会拒绝启动。

这可能是某种数据问题吗?

部分mysql错误日志包含如下条目。

020-10-23T17:35:16.621498Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.user. The table is probably corrupted!
2020-10-23T17:35:16.621726Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.db. The table is probably corrupted!
2020-10-23T17:35:16.621933Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.tables_priv. The table is probably corrupted!
2020-10-23T17:35:16.622143Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.tables_priv. The table is probably corrupted!
2020-10-23T17:35:16.622360Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.columns_priv. The table is probably corrupted!
2020-10-23T17:35:16.622563Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.procs_priv. The table is probably corrupted!
2020-10-23T17:35:16.622772Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.procs_priv. The table is probably corrupted!
2020-10-23T17:35:16.622991Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.proxies_priv. The table is probably corrupted!
2020-10-23T17:35:16.623214Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.proxies_priv. The table is probably corrupted!
2020-10-23T17:35:16.623437Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.proxies_priv. The table is probably corrupted!
2020-10-23T17:35:16.623663Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.role_edges. The table is probably corrupted!
2020-10-23T17:35:16.623894Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.role_edges. The table is probably corrupted!
2020-10-23T17:35:16.624129Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.default_roles. The table is probably corrupted!
2020-10-23T17:35:16.624367Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.default_roles. The table is probably corrupted!
2020-10-23T17:35:16.624607Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.global_grants. The table is probably corrupted!
2020-10-23T17:35:16.624851Z 0 [Warning] [MY-013139] [Server] Cannot load from mysql.password_history. The table is probably corrupted!
2020-10-23T17:35:16.625506Z 0 [ERROR] [MY-013139] [Server] Cannot load from mysql.global_grants. The table is probably corrupted!
2020-10-23T17:35:16.625804Z 0 [ERROR] [MY-010952] [Server] The privilege system failed to initialize correctly. For complete instructions on how to upgrade MySQL to a new version please see the 'Upgrading MySQL' section from the MySQL manual.
2020-10-23T17:35:16.626504Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-10-23T17:35:17.559791Z 0 [System] [MY-010910] [Server] /usr/local/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.22)  MySQL Commun

当我从SQL文件备份中进行还原时,MySQL不会尝试还原MySQL模式(或者通过错误消息告诉我)。但是,除了该(预期)错误之外,还原还可以。

我真的很沮丧。

在我的系统上,/ etc中没有单独的my.cnf配置文件

文件夹权限可以是wheel mysql,也可以是各个目录的mysql mysql。

非常感谢。

0 个答案:

没有答案