Reputation: 1999
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
Upvotes: 10
Views: 35409
Reputation: 1508
In my case, I could fix the issue by following commands. (On Ubuntu 20.04 (LTS) x64 DigitalOcean)
cd /var/lib/mysql
mkdir '#innodb_redo'
chown mysql:mysql '#innodb_redo'
systemctl restart mysql
I entered the server as root, but it should work as the same when you use sudo.
Upvotes: 1
Reputation: 29
Well done Aleksandar Vučetić!
I have deleted these files from "mysql/data":
- ib_logfile0
- ib_logfile1
- ibdata1
and MySQL Service is started again.
MySQL log says:
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
140719 0:57:55 InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
140719 0:57:55 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 54 MB
InnoDB: Database physically writes the file full: wait...
140719 0:57:56 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 54 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
140719 0:57:57 InnoDB: Started; log sequence number 0 0
Upvotes: 2
Reputation: 7
In my case I had removed c:\windows\temp\myslql folder. I created "mysql" folder in temp again and viola it worked!
Upvotes: -2
Reputation: 31
You can edit the .cnf
, search for innodb_log_file_size
parameter and set the size (in Megabytes) that match the size of the ib_logfile0
.
C:\MySql\data> dir
24/10/2012 08:47 24.117.248 ib_logfile0
Megas = 24117248 / 1024 / 1024 = 23
innodb_log_file_size=23M
That try to start the service.
Upvotes: 3
Reputation: 14953
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.
Upvotes: 11