Mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
安装mysql后,启动时候没有启动成功,查看了下日志报错如下:---------------------------------------------
1 可以:初始化mysql:mysql_install_db
2 目录权限问题chown -R mysql:mysql /var/lib/mysql
[root@localhost local]# less /var/log/mysqld.log
1、查看报错信息如下:
[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
2、经过查阅资料得知。要敲如下命令解决:
mysql_install_db –usrer=mysql datadir=/var/lib/mysql
datadir是我的mysql存放文件目录
3、然后重启mysql还是不行:
MySQL Daemon failed to start.
正在启动 mysqld: [失败]
4、然后试了下单独的命令,启动完成
mysql_install_db
5、启动mysql服务
[root@mysql mysqld]# /etc/init.d/mysqld restart
停止 mysqld: [确定]
正在启动 mysqld: [确定]
相关文章
- 07-15[ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'user' (errno: 2 - No such file or directory)
- 07-15安装解压版本的MySQL,安装过程中的常见命令,检查windows系统错误日志的方式来检查MySQL启动错误,关于Fatal error: Can't open and lock privilege
- 07-15[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
- 07-15Mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
- 07-15mysql8.0卸载,安装5.6报错,error: Can't open and lock privilege tables: Table 'mysql.user' do
- 07-15【转】安装mysql 出现:Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
- 07-15[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 160913 02:11:21 mysqld_safe mysqld from pid file /tmp/mysql.pid ended
- 07-15Mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
- 07-15Mysql报错Fatal error:Can't open and lock privilege tables