MySQL 8.0未找到数据字典版本号

我已经在我的测试服务器上更新了
MySQL 8.0.3到8.0.4.但是,它不会启动该服务.

附加信息的LOG:

2018-01-24T04:32:26.996977Z 0 [System] [MY-010116] /usr/sbin/mysqld (mysqld 8.0.4-rc-log) starting as process 12406 ...
2018-01-24T04:32:27.444234Z 1 [ERROR] [MY-011096] No data dictionary version number found.
2018-01-24T04:32:27.444725Z 0 [ERROR] [MY-010020] Data Dictionary initialization failed.
2018-01-24T04:32:27.444802Z 0 [ERROR] [MY-010119] Aborting
2018-01-24T04:32:28.806928Z 0 [System] [MY-010910] /usr/sbin/mysqld: Shutdown complete.

我也尝试运行mysqld_safe,它会抛出以下内容:

2018-01-24T04: 25: 33.852181Z mysqld_safe Logging to '/var/log/mysql/error.log'.
2018-01-24T04: 25: 33.857404Z mysqld_safe Directory '/var/run/mysqld' for UNIX socket file do not exists.

该目录不存在所以我继续创建它:

sudo mkdir -p /var/run/mysqld
sudo chown mysql: mysql /var/run/mysqld
sudo mysqld_safe

他在控制台抛出以下内容:

2018-01-24T04:27:29.816902Z mysqld_safe登录到’/var/log/mysql/error.log’.
2018-01-24T04:27:29.870025Z mysqld_safe使用/ var / lib / mysql中的数据库启动mysqld守护程序
nohup /usr/sbin / mysqld –basedir = / usr –datadir = / var / lib / mysql –plugin-dir = /usr/lib / mysql / plugin –user = mysql –log-error = / var /log/mysql/error.log –pid-file = / var / run / mysqld / mysqld.pid –socket = / var / run / mysqld / mysqld.sock –port = 3309

我再次开始服务并抛弃我:

Job for mysql.service failed because of the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.

我搜索日志,出现以下内容:

2018-01-24T04: 30: 11.601843Z 0 [System] [MY-010116] /usr/sbin/mysqld (mysqld 8.0.4-rc-log) starting as process 9140 ...
2018-01-24T04: 30: 12.001705Z 1 [ERROR] [MY-011096] No data dictionary version number found.
2018-01-24T04: 30: 12.002121Z 0 [ERROR] [MY-010020] Data Dictionary initialization failed.
2018-01-24T04: 30: 12.002232Z 0 [ERROR] [MY-010119] Aborting

我该怎么做才能启动这项服务?我查看了/ var / lib / mysql目录,还有数据库.

最佳答案 由于mysqld拒绝启动,降级回8.0.3无法正常工作:

2018-02-22T02:41:16.614370Z 1 [ERROR] InnoDB: Unsupported redo log format. The redo log was created with MySQL 8.0.4. Please follow the instructions at http://dev.mysql.com/doc/refman/8.0/en/upgrading-downgrading.html
2018-02-22T02:41:16.614425Z 1 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-02-22T02:41:17.215253Z 1 [ERROR] Failed to initialize DD Storage Engine
2018-02-22T02:41:17.216179Z 0 [ERROR] Data Dictionary initialization failed.
2018-02-22T02:41:17.216216Z 0 [ERROR] Aborting

我设法通过首先备份/ var / lib / mysql数据目录(以防任何后续步骤破坏任何内容)来恢复数据,然后在/ etc / mysql的[mysqld]部分设置innodb_force_recovery = 6 /my.cnf(参见docs),启动mysqld,然后使用mysqldump进行备份.之后我设置了一个新的mysql服务器并在那里导入了转储.

点赞