Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

basically on my vps somehow mysql.sock vanished in tmp as well lib folder. I want to reinstall mysql but will db get lost?

share|improve this question

MySQL stores its database files in /var/lib/mysql it's a good idea to backup this folder. Removing the mysql package should not remove this folder.

share|improve this answer
Thanks space,will just taking backup of dolder will suffice or anything else? irony is mysql.sock is missing and not even mysqldump is working – Vijay kudal May 2 '13 at 8:47
Just backup the files. If your MySQL server is not running, you won't be able to use mysqldump. – Spack May 2 '13 at 9:28
yup zipped all files,what do next? – Vijay kudal May 3 '13 at 6:45
zip is not a good idea. Better do cd /var/lib; tar czf mysql-db.tar.gz mysql. Then you should tell which system you're using. – Spack May 3 '13 at 7:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.