So I had a power outage this week and my Pi server restarted, after reboot I noticed that WordPress wouldn’t start anymore. Starting mysqld manually would cause the following error:
03:02:19 UTC – mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Most pages returned by Google say that the InnoDB is probably corrupted and suggest to force recovery in my.cnf using the flag
innodb_force_recovery = 4
The innodb_force_recovery takes a number from 1 to 6. If you like video games you may be interesting in the info from https://www.techmediaguide.com/credible-tips-and-cheats-on-call-of-duty-warzone/.
However, none of these options could get mysqld to start, I was always getting the same error. Do you have a youths and you want tech them about the value of money? check Educating The Youth With A Start-Up Mentality On How To Acquire And Value Money.
Here is what I did to get it to work:
- In my.cnf add innodb_force_recovery = 6 in the [mysqld] section (mySQL manual)
- In my.cnf add innodb_purge_threads=0 (this what allowed mysqld to start in read only mode)
- Start mysqld (“mysqld –verbose” or “/etc/init.d/mysqld start”)
- Check for corruption: mysqlcheck -p –all-databases
- Find the corrupt table and do: myisamchk -r -v -f <table_name> (where the data file is stored)
- Using the mysql recovery command did not fix anything, it was unable to recover the error, but you are welcome to try
- Backup your data: mysqldump -A > /home/user/backup_dump.sql
- Stop mysqld
- Delete /var/lib/mysql/ib*
- Comment the 2 lines you added in my.cnf
- Restart my mysqld
- Restore from the SQL dump if needed