mysql启动报错:Table 'mysql.host' doesn't exist

今天在安装mysql后,启动时候没有启动成功,查看了下日志报错如下:

---------------------------------------------

[[email protected] 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服务

[[email protected] mysqld]# /etc/init.d/mysqld restart

停止 mysqld:                                              [确定]

正在启动 mysqld:                                          [确定]

------------------------

dylan  presents

mysql启动报错:Table 'mysql.host' doesn't exist

时间: 2024-10-11 12:25:59

mysql启动报错:Table 'mysql.host' doesn't exist的相关文章

MySql启动报错,无法更新PID文件

MySql启动报错 Starting MySQL.. ERROR! The server quit without updating PID file (/var/lib/mysql..) 1,查看错误日志 2017-08-10 19:38:14 31865 [Note] InnoDB: Initializing buffer pool, size = 50.0M InnoDB: mmap(53657600 bytes) failed; errno 12 2017-08-10 19:38:14

linux mysql启动报错Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

vi /etc/my.cnf  查看日志文件路径: log-error=/var/log/mysqld.log 查看报错日志: 之前的服务器被别人拿了,所以自己买了台美国vps,根据笔记安装完启动mysql,又启动不了. 查看了错误日志 引用 090321 18:55:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/libexec/mysqld: Ta

mysql 启动报错 “mysql-bin.index not found (Errcode: 13)“

安装好mysql数据库后,直接在安装的目录下 /usr/local/mysql  下新建了一个目录data 用于存放数据,建好后,直接去启动数据库,发现启动不了,出现如下报错: mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13) [E

mysql启动报错

mysql启动报错的原因常见的有一下几种: 1.数据所在分区满了 2.pid所在目录mysql用户没有写权限 3.存储引擎为innodb引擎,这个时候启动的时候需要恢复所有的操作(select,create,drop,insert.update,delete),当不能有效的执行恢复操作的时候,mysql启动报错 早上来上班的时候,被通知整栋大楼要停电,想了一下,公司机房还放了几台测试机,如果突然断电的话,会导致测试机中的虚拟机不可用,赶紧一台一台关机吧,其中有一台虚拟机上装着mysql,先进去把

新安装的MySQL启动报错The server quit without updating PID file

安装的MySQL启动报错The server quit without updating PID file [[email protected] mysql]# service mysqld restart MySQL server PID file could not be found!                  [失败] Starting MySQL.The server quit without updating PID file (/[失败]ysql/l ocalhost.loc

Mysql启动报错解决方案:Failed to open log (file './mysql-bin.000901', errno 2)

ps -ef|grep mysql 发现里边没有mysql进程,于是进行重启. service mysqld start报错 查看错误日志 tail -100 /usr/local/mysql/var/iZ11yohng9aZ.err(主机名.err) 180223 15:31:51 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var 180223 15:31:51 InnoDB: The Inn

MySQL 启动报错:File ./mysql-bin.index not found (Errcode: 13)

一 说明: 前几天,试着复制了一个mysql目录到另一台机器上面,然后更改权限并启动,但是一直报错 Starting MySQL. ERROR! The server quit without updating PID file (/data/mysql/AY14020816093477605eZ.pid). 二 排查: 上面只能看到mysql启动失败,具体的原因,需要查看数据库目录下的.err文件,查看.err文件,内容如下: 140726 00:18:10 mysqld_safe mysql

mysql启动报错 The server quit without updating PID file

[[email protected] data]# /etc/init.d/mysqld startStarting MySQL... ERROR! The server quit without updating PID file (/usr/local/mysql/data/uz6542.pid). 解决方法:初始化mysql /usr/local/mysql/scripts/mysql_install_db --user=mysql --datadir=/usr/local/mysql/d

mysql启动报错:Starting MySQL... ERROR! The server quit without updating PID file

mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 的解决方法: 首先看一下我的mysql的配置文件的配置: cat /usr/local/mysql/my.cnf [mysqld] basedir = /usr/local/mysql datadir = /opt/mysql/data port = 3306 server_id = 1