Linux下yum安装mysql 遇到的问题Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 错误
今天在linux下安装mysql时
执行service mysqld start时, mysql总是启动失败
后来查看mysql日志:/var/log/mysqld.log,发现有个Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 错误
我想可能是mysql.user我安装时没初始化好导致,用下面命令初始化一下数据库就好了
linux初始化数据库:mysql_install_db --user=mysql
执行:
service mysqld restart
mysql -u root -p
就可以进入了!
本文来自博客园,作者:漫点,转载请注明原文链接:https://www.cnblogs.com/mandian/p/16583746.html