Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist的解决方法

现象:

Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

原因:

重装的时候数据目录不一致导致

解决办法:

# /usr/bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql/
原文地址:https://www.cnblogs.com/John-2011/p/14760470.html