您的位置:首页 > 数据库 > MySQL

邮箱数据库:MySQL Daemon failed to start

2018-01-08 20:10 513 查看
今天一过来,发现邮箱上不去了,检查下页面报错,数据库问题,检查mysql,挂掉了,尝试启动

service mysqld start
MySQL Daemon failed to start
service mysqld start
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]


vi /var/log/mysqld.log

180106 13:01:18 [ERROR] Plugin 'InnoDB' init function returned error.
180106 13:01:18 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
180106 13:01:18 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
180106 13:01:18 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
180108 08:49:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
180108  8:49:14  InnoDB: Initializing buffer pool, size = 8.0M
180108  8:49:14  InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
180108  8:49:14 [ERROR] Plugin 'InnoDB' init function returned error.
180108  8:49:14 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
180108  8:49:14 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
180108 08:49:14 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended


find / -name ib_logfile0

/var/lib/mysql/ib_logfile0
/usr/local/mysql-5.6.38-linux-glibc2.12-x86_64/data/ib_logfile0


find / -name ib_logfile1

/var/lib/mysql/ib_logfile1
/usr/local/mysql-5.6.38-linux-glibc2.12-x86_64/data/ib_logfile1


因为环境是接手过来的,所以没有清楚之前的安装情况,只有推断去看

这两个文件说明可能是mysql用service mysqld start启动时选的数据文件有问题

尝试

/etc/init.d/mysql
mysqld        mysql.server
[root@kafzook5 mysql]# /etc/init.d/mysql.server start
Starting MySQL                                             [  OK  ]


注:有的博客解决方案是去删除ib_logfile0、ib_logfile1或者初始化mysql_install_db,那种方式仅仅适用于没有什么数据的情况,否则数据会丢失
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: