Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL not starting, InnoDB not available

Tags:

mysql

A client's server is running MySQL 5.0. Last night the server automatically restarted to install Windows updates. After restarting, MySQL does not want to run any more. The MySQL log indicates that it shut down normally. Windows logs shows the service can't start because "Default storage engine (InnoDB) is not available". MySQL was running fine for years before this and nothing was recently changed.

Daily backups are made of the data, and the installation directory is still there.

How do I get the MySQL service running again?

EDIT: I just noticed the following in the server.err file in the data folder:

InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes
InnoDB: than specified in the .cnf file 0 25165824 bytes!
120112  5:16:30 [ERROR] Default storage engine (InnoDB) is not available
120112  5:16:30 [ERROR] Aborting
like image 569
Corne Beukes Avatar asked Jan 12 '12 03:01

Corne Beukes


People also ask

What is the InnoDB in MySQL?

InnoDB is a general-purpose storage engine that balances high reliability and high performance. In MySQL 5.6, InnoDB is the default MySQL storage engine. Unless you have configured a different default storage engine, issuing a CREATE TABLE statement without an ENGINE clause creates an InnoDB table.

How do I enable InnoDB in Cpanel?

To enable it, ssh to your server as root and open file /etc/my. cnf with your favorite editor. Search for line skip-innodb and comment the line by placing # in the starting of the line. Save and quit the file and restart mysql service for changes to take effect.


1 Answers

You should stop mysql server, delete log file and start it again. It should work afterwards. Of course, make a backup first. If it doesn't work, try fix from this link.

like image 96
Aleksandar Vucetic Avatar answered Oct 21 '22 15:10

Aleksandar Vucetic