Tag Archives: MySQL exception

Failed to find valid data directory.Data Dictionary initialization failed.

Error starting MySQL

As long as this sentence is wrong, it will be reported, so you can’t check Baidu or something like that according to this sentence

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

Click the command to see systemctl status mysql.server.service   And journalctl Xe

There are many kinds of errors, and Baidu has not found a result for a long time (there are also those on the Internet who say they want to change the Mac, which are not correct)
all of these errors are not correct

Follow the steps below
to complete the operation

cat  /etc/my.cnf    Take a look at the location of the error file

[mysqld_ safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

My path is/var/log/MariaDB/MariaDB. Log

Continue cat  /Var/log/MariaDB/mariadb.log to see what the real error is

If you make a mistake, it may not be the same as me. Take a closer look at the mistakes you report, and then go to Baidu or Google.
if you make a mistake, it may not be the same as me

2018-06-18T03:17:43.045657Z 0 [Warning] [MY-011070] [Server] ‘Disabling symbolic links using –skip-symbolic-links (or equivalent) is the default. Consider not using this option as it’ is deprecated and will be removed in a future release.2018-06-18T03:17:43.098624Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.11) starti ng as process 1109

2018-06-18T03:17:44.315384Z 1 [ERROR] [MY-011011] [Server] Failed to find valid data directory.

2018-06-18T03:17:44.343897Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.

2018-06-18T03:17:44.343979Z 0 [ERROR] [MY-010119] [Server] Aborting

2018-06-18T03:17:44.444999Z 0 [System] [MY-010910] [Server] /usr/local/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.11)   MySQL Community Server – GPL.

My solution to this problem

https://forums.mysql.com/read.php?11,665874,665886

In VI/etc/my.cnf   hold

#datadir=/var/lib/mysql   Just leave out the comments

Yesterday morning and this morning, I have been looking for 4 or 5 hours. I didn’t expect that it was just a comment!!!