Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Incidentally, 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. –  Kayle Apr 16 '12 at 1:17
    
Please show all variables from my.cnf that are innodb settings –  RolandoMySQLDBA Apr 24 '12 at 21:26

4 Answers 4

After checking the logs I found the following error:

[ERROR] Unknown/unsupported storage engine: InnoDB

I tried renaming these files:

rm /var/lib/mysql/ib_logfile0
rm /var/lib/mysql/ib_logfile1 

at /var/lib/mysql

This resolved my Problem after restart.

share|improve this answer
2  
the rm command is used to Remove files rather than rename them as far as i know... –  Itai Ganot May 21 at 7:06
    
Those files contain the actual data for your database. You don't want to delete them. –  Stefan Lasiewski Jun 2 at 20:26
    
No, the ibdata file contains the data (unless you have file-per-table). The ib_logfile files are the replay logs that contain the data for database-altering transactions that may have been in process when/if the database crashed. If you were able to shutdown the server successfully, deleting these log files won't hurt you. If it crashed, then you need them. But this is a valid answer. If your my.cnf file changes the innodb_log_file_size option and it no longer matches those two files, you will get the error message that the OP states. Deleting/moving so new ones can be made fixes it. –  Safado Jun 30 at 15:28
    
Why 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. –  Safado Jun 30 at 15:40
    
I'm pretty sure he means remove. Either way his solution worked for me. –  josten Sep 26 at 17:37

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.

share|improve this answer
    
Thanks, at last something that works for me! –  atoMerz Feb 12 at 9:08
    
+1, Never notice the official document. it should set default-storage-engine and default-tmp-storage-engine, thanks. –  Giberno Nov 7 at 8:48

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
share|improve this answer
3  
Try to add "default-storage-engine=myisam" to /etc/mysql/my.cnf in the [mysqld] section if you want to have "skip_innodb". –  pincoded Jul 30 '12 at 20:10
    
Works beautifully. Cheers! –  Boann Nov 12 '12 at 8:11
1  
What if you want innodb-support? –  Nilzor Jun 5 '13 at 9:35

Try 2 more things. 1. Lower the innodb buffer pool size. 2. Edit mysql initial script and add --innodb option.

I wonder also if your package is buggy. Could you try a different minor version?

Also, I assume your mysql server got upgraded as well? Maybe that version is broken? Precise is not final yet.

share|improve this answer
    
Already did that, to no effect. –  Kayle Apr 16 '12 at 3:53
    
Sorry, 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 Apr 16 '12 at 4:25
    
Also make sure the old package is completely purged, when the new is installed. –  johnshen64 Apr 16 '12 at 5:07
    
Would purging the package completely result in lost database information? –  Kayle Apr 16 '12 at 6:25
    
Should not, but to be safe you should always backup your DBS. –  johnshen64 Apr 16 '12 at 14:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.