InnoDB: Error: space header page consists of zero bytes in data file ./ibdata1
Edit: copied my-innodb-heavy-4G.cnf
to /etc/my.cnf.d
and the server started fine. Probably caused by changing the binlog size.
It sounds like you changed the size of your InnoDB buffer, or it became corrupted. Possible that these changes were made some time ago and just took effect when you rebooted.
Definitely make a backup of your data in /var/lib/mysql
first - preferably the entire directory.
cp -R /var/lib/mysql /var/lib/mysql-backup
With your data backed up, the best first step is to revert any changes that you made to the /etc/my.cnf
file and restart.
If that doesn't do it, or you don't know what the size of your buffer used to be, the next possible option is to delete the InnoDB binlog files and let MariaDB/MySQL recreate them. The files are named /var/lib/mysql/ib_logfile{N}
where {N}
is a number.
rm -rf /var/lib/mysql/ib_logfile*
If that doesn't solve the problem try adding the following to your /etc/my.cnf
(or whichever config file you use, backup first of course). It should go in the [innodb]
section.
innodb_buffer_pool_size = 256Minnodb_log_file_size = 256Minnodb_thread_concurrency = 16innodb_flush_log_at_trx_commit = 2innodb_flush_method = normal
The trick is knowing what MariaDB is expecting. If you don't have success with the above try just the last line and set [innodb_flush_method]
.