启动MySQL报Fatal error: Can’t open and lock privilege
程序员文章站
2024-02-17 21:05:28
...
今天在服务器上另开一个MySQL,新建一个配置文件修改了端口,存放目录后,服务起不来,查看错误日志发现错误行 Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 检查数据目录,发现mysql目录没有被创建,手动执行脚本
今天在服务器上另开一个MySQL,新建一个配置文件修改了端口,存放目录后,服务起不来,查看错误日志发现错误行
Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
检查数据目录,发现mysql目录没有被创建,手动执行脚本
mysql_install_db --usrer=mysql --datadir=/var/lib/mysql/newdata
再手工设置一下目录权限
chown mysql.mysql /var/lib/mysql/newdata -R
重新开启MySQL服务,运行正常
原文地址:启动MySQL报Fatal error: Can’t open and lock privilege, 感谢原作者分享。
推荐阅读
-
Can't open and lock privilege tables: Table 'mysql.user' doesn't
-
mysql运行出现Can’t open and lock privilege tables: Inc
-
mysql运行出现Can’t open and lock privilege tables: Inc
-
安装mysql 出现:Fatal error: Can't open and lock_MySQL
-
启动MySQL报Fatal error: Can’t open and lock privilege
-
安装mysql 出现:Fatal error: Can't open and lock_MySQL
-
Can't open and lock privilege tables: Table 'mysql.user' doesn't
-
Fatal error:can't open or lock privilege tables:can't find file:'host'(errno:2)