mysql8.0 uninstall 5.6 installation error, error: Can not open and lock privilege tables: Table 'mysql.user' does not exist

Originally initial configuration is as follows:

scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql

Appeared

[root@localhost mysql-5.6.14]# service mysql restart
 ERROR! MySQL server PID file could not be found!
Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).

The following error appears in the log:

Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

Later, using the following statement on it:

scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --ldata=/var/lib/mysql

Guess you like

Origin www.cnblogs.com/lu952450497/p/12005957.html