I’m spending a lot of time on the Facebook group of openSUSE these days. Problems & issues that people post there actually keep me investigating; something I’ve been missing for some time.

Today Artemio Stenio posted a MySQL issue he encountered. The screenshot he shared could not provide much information, so I asked him to send the mysqld-upgrade-run.log instead. See an extract of the log:

130518 15:24:57 mysqld_safe mysqld from pid file /var/tmp/mysql-protected.lsPXtR/mysqld.pid ended  
130518 15:29:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql  
130518 15:29:39 InnoDB: The InnoDB memory heap is disabled  
130518 15:29:39 InnoDB: Mutexes and rw_locks use GCC atomic builtins  
130518 15:29:39 InnoDB: Compressed tables use zlib 1.2.7  
130518 15:29:39 InnoDB: Initializing buffer pool, size = 128.0M  
130518 15:29:39 InnoDB: Completed initialization of buffer pool  
InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes  
InnoDB: than specified in the .cnf file 0 5242880 bytes!  
130518 15:29:39 [ERROR] Plugin ‘InnoDB’ init function returned error.  
130518 15:29:39 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.  
130518 15:29:39 [ERROR] Unknown/unsupported storage engine: InnoDB  
130518 15:29:39 [ERROR] Aborting130518 15:29:40 [Note] /usr/sbin/mysqld: Shutdown complete  
130518 15:29:40 mysqld_safe mysqld from pid file /var/tmp/mysql-protected.wFdcx4/mysqld.pid ended  

Now, from the above errors we can see MySQL isn’t starting because of conflicting “innodblogfile_size”.

To fix the same we can either:

  1. edit the value in my.cnf and match it with the size obtained in the log.
  2. we can delete the iblogfiles from the “datadir” and start MySQL. When the latter starts it re-creates the iblogfile with the correct size if it is not present.