Accidently uninstalled mysql server
admin, installation, mysql, recovery, uninstallation
Solution
Damn. Don't tell the client ;)
A pre-step... if the server is still running try to get replication information if you're server is replicating from somewhere or is a master for someone else. This is a post in of itself, but since I'm guessing your MySQL server is down and you won't be able to do this I won't go into it in too much detail.
- Do a full copy of ALL contents of /var/mysql somewhere safe and your /etc/my.cnf file (make sure permissions are preserved)
- Install the EXACT same version of mysql and verify it's working
- Shut down the new mysql
- Backup the default newly installed /var/mysql somewhere in case you want it again
- Copy the original /var/mysql files back as well as the original /etc/my.cnf
- Pray, Start MySQL, and move along
- Setup replication settings if needed
If you weren't replicating, step #8 will be look into setting up replication so you can save your butt the next time this happens and someone actually deletes your database files. (happened to me)
Problem
I am using Centos. On a production server, it seems, we accidently uninstalled mysql server We still see folders of our DBs in /var/mysql What can we do to recover all our data. Please be sure about what you suggest, this is client production level data. Thanks