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
David Hoelzer
  • 15,862
  • 4
  • 48
  • 67
  • 1
    Why it doesn't start? You should fix the problem that is preventing mysql to start. – cen Feb 10 '16 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 – Oferta Për Punë Feb 11 '16 at 00:13
  • Tried all of these? http://stackoverflow.com/questions/4963171/mysql-server-startup-error-the-server-quit-without-updating-pid-file Also, try restoring data folder only: http://stackoverflow.com/questions/484750/restoring-mysql-database-from-physical-files Google is also your friend: "recover mysql from files" – cen Feb 11 '16 at 00:20

0 Answers0