Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL 8.0 No data dictionary version number found

I have updated MySQL 8.0.3 to 8.0.4 on my test server. However, it does not start the service.

Attached information of the 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.

I also try to run mysqld_safe and it throws me the following:

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.

The directory does not exist so I proceed to create it again:

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

He throws the following at the console:

2018-01-24T04: 27: 29.816902Z mysqld_safe Logging to '/var/log/mysql/error.log'. 2018-01-24T04: 27: 29.870025Z mysqld_safe Starting mysqld daemon with databases from / var / lib / mysql 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

I proceed again to start the service and throw me:

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

I search the log and the following comes up:

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

What could I do to start the service? I have reviewed the /var/lib/ mysql directory and there are the databases.

like image 548
Echarbeto Avatar asked Jan 24 '18 04:01

Echarbeto


People also ask

How to find data dictionary in MySQL?

Viewing Data Dictionary Tables Using a Debug Build of MySQL Data dictionary tables are protected by default but can be accessed by compiling MySQL with debugging support (using the -DWITH_DEBUG=1 CMake option) and specifying the +d,skip_dd_table_access_check debug option and modifier.

Does MySQL have data dictionary?

MySQL Server incorporates a transactional data dictionary that stores information about database objects. In previous MySQL releases, dictionary data was stored in metadata files, nontransactional tables, and storage engine-specific data dictionaries.


1 Answers

Downgrading back to 8.0.3 did not work, as mysqld refused to start:

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

I managed to get my data back by first making a backup of the /var/lib/mysql data directory (in case any of the next steps destroys anything), then setting innodb_force_recovery = 6 in the [mysqld] section in /etc/mysql/my.cnf (see docs), starting mysqld and then making a backup using mysqldump. Afterwards I set up a new mysql server and imported the dump there.

like image 91
cdauth Avatar answered Oct 02 '22 23:10

cdauth