[root@zdcs01 mysql]# /etc/init.d/mysqld start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
查报错日志,发现没有错误日志:
[root@zdcs01 mysql]# cat /etc/my.cnf | grep log_error
log_error = /var/log/mysqld.log
[root@zdcs01 mysql]# ll /var/log/mysqld.log
-rw-r----- 1 mysql mysql 0 Jun 24 00:40 /var/log/mysqld.log
查启动报错日志:
[root@zdcs01 mysql]# cat /etc/my.cnf | grep datadir
datadir = /hadoop/mysql
[root@zdcs01 mysql]# cd /hadoop/mysql
[root@zdcs01 mysql]# ls -ltr | grep *.err
-rw-r----- 1 mysql root 34284 Jun 24 00:40 zdcs01.err
[root@zdcs01 mysql]# cat zdcs01.err
...............................
160624 0:30:02 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
...............................
解决方法:
mysql_install_db
执行上述命令后,重启mysql,问题解决。