Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to backup an old database, but by mistake I have deleted server database.. the one thing I have done is I have copied MySQL data folder. Is there a way to restore my old database with that?

  • database - MySQL
  • os - centos
  • backup I have - ibdata1, log file 0 and 1,database folder.

I tried changing the size of the log file to the original size and added innodb_force_recovery=6 to my.cnf file then tried but was unsuccessful. It just says that your ibdata1 file is corrupted or you have copied.

share|improve this question

migrated from stackoverflow.com Oct 2 '11 at 6:19

This question came from our site for professional and enthusiast programmers.

1 Answer 1

if your database tables were created as MyISAM tables then copying the directory and changing permission the owner/group to mysql should work, for innodb type there should be other files in the mysql root directory should be copied, so check that you have copied all files and permission of the files.

share|improve this answer

Your Answer

 
discard

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