Best way to repair MySQL from command line?
What's the best way to repair a MySQL database on Debian 7.4? Anyone have any pointers? I'm not using phpMyadmin.
Here's a slightly old check & optimize howto - be sure NOT to skip the first step (backup databases).
Define "out of space". Memory or Disk.
Please provide the output from the "free -m" and "df" commands.
If the the df command shows /dev/xvda (or equivalent) at or near 100% you have a disk space issue. This is frequently caused by lack of log management. Check for excess log files in /var/log.
I ran out of disk space. Basically, what happened in detail is my site was missing some information…it was just gone. I restarted Apache and that didn't work. So I rebooted the server via the reboot command from terminal.
When the server rebooted the entire site was down. So I signed in via SSH and tried to restart MySQL. That's when it told me it was out of disk space.
So, I got rid of some backup files that didn't need to be on there, and have also looked through the Logs folder.
Ran du -ah | sort -rn and no files were huge in size. The largest files were about 1000K, and there were only 200 of them.
I guess maybe my database is really large? Would anything have corrupted in this scenario? Site is up and everything seems fine.
Starting at /
sudo du -sk *
Follow any interesting paths. This can lead to large files and/or directories with lots of smaller files. You do, however, have to understand what you are looking at and do not do anything you will regret.
I got my space issues fixed, but now there's a problem with the database. The site is working fine, but when I try and backup the database with Backupbuddy it is halting on a db error.
So I used the link above from Vonskippy to check and analyze the database. Both fail, saying the same thing:
Error : Table 'oilygurusmain.og_wfNet404s' doesn't exist
Error : Table 'oilygurusmain.og_wfVulnScanners' doesn't exist