Mysql – mariadb won’t start (InnoDB error: space header page consists of zero bytes in data file ./ibdata1)

innodbmariadbMySQL

The following messages are in /var/log/mariadb/mariadb.log when I try to start mariadb:

151103 13:42:01 [Note] InnoDB: Initializing buffer pool, size = 128.0M
151103 13:42:01 [Note] InnoDB: Completed initialization of buffer pool
151103 13:42:01 [Note] InnoDB: Restoring page 0 of tablespace 0
151103 13:42:01 [Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0
151103 13:42:01 [ERROR] InnoDB: space header page consists of zero bytes in data file ./ibdata1
151103 13:42:01 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
151103 13:42:01 [ERROR] Plugin 'InnoDB' init function returned error.

This error seems similar to this one (https://stackoverflow.com/questions/26576745/innodb-error-space-header-page-consists-of-zero-bytes-in-data-file-ibdata1
), but this is a brand new Fedora 22 system and the database has not been used, yet.

Best Answer

Stop mariadb, remove ibdata1, restart.