Unknown/unsupported storage engine: InnoDB | MySQL Ubuntu
Solution 1
After checking the logs I found the following error:
[ERROR] Unknown/unsupported storage engine: InnoDB
I removed these files:
rm /var/lib/mysql/ib_logfile0
rm /var/lib/mysql/ib_logfile1
at /var/lib/mysql
This resolved my problem after restart.
Solution 2
If you really need skip-innodb
(use case: low memory footprint), then of course you don't have to comment it out. However, if InnoDB is the default storage engine, the server will fail to start until you tell it which storage engine to use instead, e.g. default-storage-engine=myisam
for MyISAM.
So, try this:
$ sudo -u mysql mysqld --skip-innodb --default-storage-engine=myisam
Solution 3
If you're using MySQL 5.6+ and want to disable InnoDB, don't forget "--default-tmp-storage" or it won't work:
To disable InnoDB, use --innodb=OFF or --skip-innodb. In this case, because the default storage engine is InnoDB, the server will not start unless you also use --default-storage-engine and --default-tmp-storage-engine to set the default to some other engine for both permanent and TEMPORARY tables.
http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#option_mysqld_ignore-builtin-innodb
You can add this to your my.cnf:
[mysqld]
innodb=OFF
ignore-builtin-innodb
skip-innodb
default-storage-engine=myisam
default-tmp-storage-engine=myisam
just to make sure it'll work.
Solution 4
Check your mysql error log.
tail -100 /var/log/mysql/error.log
If your log says (like mine did):
InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
You don't have enough memory to use the default buffer size of 128M
Edit the config file /etc/mysql/my.cnf adding a line to specify a smaller innodb_buffer_pool_size.
# make the buffer pool smaller than 128M since we only have 1 GB of total RAM
innodb_buffer_pool_size = 16M
Save the config file, and start mysql
sudo service mysql start
Related videos on Youtube
Garrett
Updated on September 18, 2022Comments
-
Garrett over 1 year
I recently upgraded from the previous LTS Ubuntu to Precise and now mysql refuses to start. It complains of the following when I attempt to start it:
╰$ sudo service mysql restart stop: Unknown instance: start: Job failed to start
And this shows in "/var/log/mysql/error.log":
120415 23:01:09 [Note] Plugin 'InnoDB' is disabled. 120415 23:01:09 [Note] Plugin 'FEDERATED' is disabled. 120415 23:01:09 [ERROR] Unknown/unsupported storage engine: InnoDB 120415 23:01:09 [ERROR] Aborting 120415 23:01:09 [Note] /usr/sbin/mysqld: Shutdown complete
I've checked permissions on all the mysql directories to make sure it had ownership and I also renamed the previou ib_logs so that it could remake them. I'm just getting no where with this issue right now, after looking at google results for 2 hours.
-
Garrett about 12 yearsIncidentally, I did get mysql to run by commenting out the "skip_innodb" entry in my.cnf. But I'm fairly certain that I wasn't supposed to solve this that way.
-
RolandoMySQLDBA about 12 yearsPlease show all variables from my.cnf that are innodb settings
-
-
Garrett about 12 yearsAlready did that, to no effect.
-
johnshen64 about 12 yearsSorry, edited it with some things to try, more like a bad package. Try to use the mysql.com version or percona which are usually more stable.
-
johnshen64 about 12 yearsAlso make sure the old package is completely purged, when the new is installed.
-
Garrett about 12 yearsWould purging the package completely result in lost database information?
-
johnshen64 about 12 yearsShould not, but to be safe you should always backup your DBS.
-
pincoded almost 12 yearsTry to add "default-storage-engine=myisam" to /etc/mysql/my.cnf in the [mysqld] section if you want to have "skip_innodb".
-
Boann over 11 yearsWorks beautifully. Cheers!
-
Mohsin almost 11 yearsWhat if you want innodb-support?
-
Mohsin almost 11 years1. Helped for me - I was running at AWS EC2 Micro instance and 128MB was simply too much. "innodb_buffer_pool_size = 16M" under the [mysqld] section of my.cnf did the trick
-
Itai Ganot almost 10 yearsthe
rm
command is used to Remove files rather than rename them as far as i know... -
Stefan Lasiewski almost 10 yearsThose files contain the actual data for your database. You don't want to delete them.
-
Safado almost 10 yearsWhy edits can only be made for 5 minutes is beyond me... I should have stated it is a potential fix for the above mentioned error. As stated by the OP, it was not the fix he needed.
-
Giberno over 9 years+1, Never notice the official document. it should set
default-storage-engine
anddefault-tmp-storage-engine
, thanks. -
Ram on Rails React Native over 8 yearsI could not "ignore or skip" innodb as I had at hand, over 10 years of data from a customer in that ibdata file. The only option was to keep "innodb" engine selected and make that data work with the mysql server.
-
Rob Cle over 8 yearsThis solution also worked for me. No data damaged.
-
Paul Carlton over 8 yearsThis solution worked for me as well. +1
-
Dallaylaen over 8 yearsGot this error after running out of free disk space during mysql (re)install. Finding & removing truncated files helped.
-
kenorb about 8 yearsYou can always rename them, e.g.
mv ib_logfile0 ib_logfile0.bak && mv ib_logfile1 ib_logfile1.bak
. -
Damodar Bashyal about 7 yearsMariadb on Centos 7 added
default-storage-engine=myisam
on file /etc/my.cnf under[mysqld]
. That did the trick. Thx -
sjas about 7 yearsIs spot on here. But could also be hanging processes of the webserver or something eating up the RAM, do check that, too.
-
Peter Chaula over 3 yearsThis works for some people and I appreciate that. However, the lack of an explanation as to how deleting those files fixes the problem has me worried.
-
RavanH over 2 yearsI found "[ERROR] InnoDB: Missing FILE_CHECKPOINT at 45142 between the checkpoint 45142 and the end 4115531." in the log not far before the "Unknown/unsupported storage engine" error. Deleting the /var/lib/mysql/ib_logfile0 (there was no ib_logfile1) indeed allowed me to run "service mysql start" without failing. But... Data was damaged. It was only only a local dev WordPress running but that needed a reinstall. Not sure if db corruption this was the cause of the error or the result of the file deletion :/