karimali831 Posted July 12, 2010 Share Posted July 12, 2010 Hello, I executed a rather stupid command "chown -R apache:user /" which crashed the entire VPS and upon restarting the container, nothing was running and my host said the MySQL / DNS etc has been damaged as a result. The databases are very important to me and when I attempt to use mysqldump, I get the following error: Couldn't execute '/*!40103 SET TIME_ZONE='+00:00' */': Can't find file: './mysql/time_zone_name.frm' (errno: 13) (1017) So I access SFTP and can see my databases at /var/lib/mysql which contain many files in them and not the .sql file itself. Question is, will I able to restore my databases by downloading these files within the database directory? Link to comment https://forums.phpfreaks.com/topic/207493-need-urgent-help/ Share on other sites More sharing options...
Mchl Posted July 12, 2010 Share Posted July 12, 2010 Depends what files you actually have access to. See here for details. http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html Link to comment https://forums.phpfreaks.com/topic/207493-need-urgent-help/#findComment-1084798 Share on other sites More sharing options...
karimali831 Posted July 12, 2010 Author Share Posted July 12, 2010 The files downloaded: MYD MYI frm Link to comment https://forums.phpfreaks.com/topic/207493-need-urgent-help/#findComment-1084805 Share on other sites More sharing options...
Mchl Posted July 12, 2010 Share Posted July 12, 2010 If you used MyISAM tables only (as opposed to InnoDB), that should be enough. Also make sure to backup your configuration file (my.ini). Be aware, that data files could get corrupted when server crashed. If you're lucky, simple REPAIR TABLE command will fix it. Link to comment https://forums.phpfreaks.com/topic/207493-need-urgent-help/#findComment-1084806 Share on other sites More sharing options...
karimali831 Posted July 12, 2010 Author Share Posted July 12, 2010 I have never used this method before so I am not sure how to do this. BUT.. I'm sure there is a way to bypass this error: Couldn't execute '/*!40103 SET TIME_ZONE='+00:00' */': Can't find file: './mysql/time_zone_name.frm' (errno: 13) (1017) what does it mean? time_zone_name.frm is missing file in var/lib/mysql ? Link to comment https://forums.phpfreaks.com/topic/207493-need-urgent-help/#findComment-1084815 Share on other sites More sharing options...
karimali831 Posted July 12, 2010 Author Share Posted July 12, 2010 I created this file and run mysqldump command and now I get: mysqldump: Got error: 2002: Can't connect to local MySQL server through socket ' /var/lib/mysql/mysql.sock' (111) when trying to connect major prob? Link to comment https://forums.phpfreaks.com/topic/207493-need-urgent-help/#findComment-1084819 Share on other sites More sharing options...
Mchl Posted July 12, 2010 Share Posted July 12, 2010 I'm not sure but it might indicate your MySQL installation is corrupted and needs to be reinstalled. You might want to ask at http://forums.mysql.com for more expert advice. Link to comment https://forums.phpfreaks.com/topic/207493-need-urgent-help/#findComment-1084821 Share on other sites More sharing options...
karimali831 Posted July 12, 2010 Author Share Posted July 12, 2010 I contacted my host regarding this but they said it can restore it back to normal but all data will be erased. Link to comment https://forums.phpfreaks.com/topic/207493-need-urgent-help/#findComment-1084831 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.