The solution to the error "mysql deamon failed to start" error when installing and starting mysql under centos

1. Execute start and report an error:

 

# /etc/init.d/mysqld start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]

 2. View the log file of mysqld 

 

 

#tail -n 100 /var/log/mysqld.log
[ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
[ERROR] InnoDB: Plugin initialization aborted with error Generic error
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Failed to initialize plugins.
[ERROR] Aborting

 

3. Solution:

Since it is the first installation and an error is reported, delete all the files in the /var/lib/mysql directory directly, and then restart it successfully.

 

 

 

Guess you like

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