Background
I have been running the site, suddenly one day I found that the site was hung, after the investigation is the database hung off.
Login MySQL appears:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
To restart MySQL, it appears:
stop:unknown instancestart:job failed to start
Because I found that MySQL has been hung up, so I can not backup the normal way, I think of the direct copy/var/lib/mysql files for data backup.
Business
After I reinstalled MySQL, I replaced several of the previous backups under/var/lib/mysql/dbname/. frm, start MySQL, found that the backup of the previous data is not, or the data in the newly created database.
After searching, I learned that InnoDB had to replace ibdata1, so after I replaced it, I could not successfully start my MySQL, prompt:
start:failed to start
Solve, how do I recover my previous data?
Reply content:
Background
I have been running the site, suddenly one day I found that the site was hung, after the investigation is the database hung off.
Login MySQL appears:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
To restart MySQL, it appears:
stop:unknown instancestart:job failed to start
Because I found that MySQL has been hung up, so I can not backup the normal way, I think of the direct copy/var/lib/mysql files for data backup.
Business
After I reinstalled MySQL, I replaced several of the previous backups under/var/lib/mysql/dbname/. frm, start MySQL, found that the backup of the previous data is not, or the data in the newly created database.
After searching, I learned that InnoDB had to replace ibdata1, so after I replaced it, I could not successfully start my MySQL, prompt:
start:failed to start
Solve, how do I recover my previous data?
View the specific MYSQ error log file to resolve the problem according to the error message inside