0

I have problem with mysql and it can not start. If I delete folder

var/lib/mysql

and then I reinstall mysql it works.

If I restore old files to var/lib/mysql then it doesn't work.

  • I have a database there that i need to backup.

I tried mysqldump but I get

mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect

so is there a way to generate a .sql file from

var/lib/mysql
3
  • 1
    Why it doesn't start? You should fix the problem that is preventing mysql to start.
    – cen
    Feb 10, 2016 at 23:56
  • Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/mysqld.pid). - i try chmod 777, chown mysql:mysql / deleting /etc/my.cnf but no sucess Feb 11, 2016 at 0:13
  • Tried all of these? stackoverflow.com/questions/4963171/… Also, try restoring data folder only: stackoverflow.com/questions/484750/… Google is also your friend: "recover mysql from files"
    – cen
    Feb 11, 2016 at 0:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.