Mysql – accidentally deleted thesql folder

MySQL

I am in a problem. I have accidentally deleted etc/mysql by writing sudo rm -r /etc/mysql
.How can i restore it or if not then what to do next .when I am typing mysql command its saying :

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)
what to do next ?

Best Answer

Go to your most recent backups and restore all the files. And. if you don't have a recent backup, why the blazes not?

Assuming you can get the information back using what will undoubtedly be some good answers here, institute a backup policy!. Disk space is ridiculously cheap.

Marked CW since it doesn't answer your specific problem but it is useful, mark my words. Anyone who reads this answer and doesn't back up their stuff in a timely manner, take heed, you will get burnt (and, if it's your digital photo collection of wife and kids from the last ten years, your wife will have every right to castrate you while you sleep).

If this happens to you again, you deserve all the angst you'll get and I will openly mock and deride you :-)

Related Topic