hybinet wrote:
'mysql' and 'main' are not tables, they're databases. Databases contain tables. Just a technicality, but this distinction might help when you're searching for solutions.
Can you produce a dump (backup) of the 'main' database while MySQL is running in 'safe mode'? You can use the 'mysqldump' command to do this. If this works, at least you've got your data safely in your hands, and you might be able to load it back into another database. If nothing else works, you can also load the dump back into a fresh (re)install of MySQL.
No, you won't have to reinstall the whole server, just MySQL if it is corrupt. If you need to resort to reinstalling MySQL, make sure to produce a dump and also back up the entire MySQL data directory. The data directory is usually /var/lib/mysql, but it could differ depending on your setup. (After you confirm that your backups are safe, stop MySQL and delete the data directory before you run the reinstall, since it's apparently corrupted.)
Hi Thank you for your help, I assumed that would be the answer but I wasn't 100% sure. And yes, I did screw up the last post with table vs. database I am afflicted with sudden onset retardation on occasion.
I took a backup.
yum removed mysql
renamed /var/lib/mysql to /var/lib/mysqlx
yum install mysql mysql-server
created the new database main
restored back up and it seems to be back up and running fine.