1

I have just come across the most random error I've seen my MySQL daemon spew out yet, everything was working fine, then all of a sudden it randomly crashed and it now outputting this when I start it up, not sure if it's because my 'my.cnf' file is minimal

Here's my 'my.cnf':

[mysqld]
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
datadir=/var/lib/mysql/
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Here's the errors:

120817  3:47:26 [Note] Plugin 'FEDERATED' is disabled.
120817  3:47:26 InnoDB: The InnoDB memory heap is disabled
120817  3:47:26 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120817  3:47:26 InnoDB: Compressed tables use zlib 1.2.5
120817  3:47:26 InnoDB: Using Linux native AIO
120817  3:47:26 InnoDB: Initializing buffer pool, size = 128.0M
120817  3:47:26 InnoDB: Completed initialization of buffer pool
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
InnoDB: 384 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
120817  3:47:26 InnoDB: Could not open or create data files.
120817  3:47:26 InnoDB: If you tried to add new data files, and it failed here,
120817  3:47:26 InnoDB: you should now edit innodb_data_file_path in my.cnf back
120817  3:47:26 InnoDB: to what it was, and remove the new ibdata files InnoDB created
120817  3:47:26 InnoDB: in this failed attempt. InnoDB only wrote those files full of
120817  3:47:26 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
120817  3:47:26 InnoDB: remove old data files which contain your precious data!
120817  3:47:26 [ERROR] Plugin 'InnoDB' init function returned error.
120817  3:47:26 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120817  3:47:26 [ERROR] mysqld: unknown variable 'max_used_connections=0'
120817  3:47:26 [ERROR] Aborting

120817  3:47:26 [Note] mysqld: Shutdown complete

Any help would be greatly appreciated, thanks guys! :D

3

2 Answers 2

2

You'd be better off asking this in a server forum than progrmming forum?

I think you can delete the ibdata1 files safely and they get rebuilt, but to be sure rename the ibdata1 file(s) and restart MySQL. If that fails, rename it back and go to the right place ;)

If it does work, run mysqlcheck (http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html) and/or possibly export all data as SQL (mysqldump), wipe the entire database and re-import from the dump file.

1
  • Nope, didn't work, the databases now contain no tables :/ So even if I do a dump it doesn't output code to create the tables that I had.
    – Conner Stephen McCabe
    Aug 17, 2012 at 9:54
1

Could be value of innodb_data_file_path got changed. Check your /etc/mysql/conf.d/* files.

If not specified otherwise, the default is

innodb_data_file_path=ibdata1:10M:autoextend

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .