当前位置:Gxlcms >
数据库问题 >
Mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
Mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
时间:2021-07-01 10:21:17
帮助过:29人阅读
1 可以:初始化mysql:mysql_install_db2 目录权限问题chown -R mysql:mysql /var/lib/mysql[root@localhost local]# less /var/log/mysqld.log1、查看报错信息如下:[ERROR] Fatal error: Can‘t open and lock privilege tables: Table ‘mysql.host‘ doesn‘t exist2、经过查阅资料得知。要敲如下命令解决:mysql_install_db –usrer=mysql datadir=/var/lib/mysqldatadir是我的mysql存放文件目录3、然后重启mysql还是不行:MySQL Daemon failed to start.正在启动 mysqld: [失败]4、然后试了下单独的命令,启动完成mysql_install_db5、启动mysql服务[root@mysql mysqld]# /etc/init.d/mysqld restart停止 mysqld: [确定]正在启动 mysqld: [确定]Mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
标签:安装 oca restart family 12px -- font 停止 tar