Mailbox database: MySQL Daemon failed to start

When I came over today, I found that the mailbox could not be accessed. Check the next page for errors, database problems, check mysql, hang up, try to start

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

Because the environment is taken over, I don't know the previous installation situation, I can only infer it.

These two files indicate that there may be a problem with the data file selected when mysql is started with service mysqld start.
Try

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

Note: Some blog solutions are to delete ib_logfile0, ib_logfile1 or initialize mysql_install_db, that method is only suitable for cases where there is no data, otherwise the data will be lost

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326012527&siteId=291194637