1

I've got a Windows Server and I get Windows Server Backup to backup all the files every day. I don't however have a system image so I cannot use that.

I've tried just copying the database files into the MySQL Data folder, but most/all of the tables are missing (wordpress). Is there any other way I could recover this data?

I believe it was using InnoDB.

Zapto
  • 1,824
  • 6
  • 23
  • 39
e__
  • 61
  • 1
  • 7
  • A list of the filenames that you restored would be helpful. – Aaron Brown Jan 15 '12 at 17:38
  • http://coxnetworks.co.uk/databases.png I think are the important ones – e__ Jan 15 '12 at 17:50
  • Ok, I've got it to work. I installed WAMPServer, copied and pasted the whole data directory, went into phpmyadmin, exported it, and then got back to the normal mysql install package. Don't ask me why it worked, but it did. – e__ Jan 15 '12 at 18:18

3 Answers3

2

If you are using InnoDB, then you need the ibdata* files that should have been in the main MySQL data directory, i.e. the parent of the folder containing the database files.

daemonofchaos
  • 1,211
  • 1
  • 8
  • 10
  • I have the ibdata files (http://coxnetworks.co.uk/databases.png), but how would I go about restoring them on Windows? – e__ Jan 15 '12 at 17:52
  • Stop MySQL server, place the ibdata files where they belong and then restart MySQL. This of course is assuming that the new MySQL server doesn't have any other data. – daemonofchaos Jan 15 '12 at 17:53
  • That's what I tried, but it just doesn't start at all if I do it. It doesn't have any data at the moment, apart from obviously the performance_scheme stuff that comes 'preinstalled' – e__ Jan 15 '12 at 17:57
  • Check your MySQL error log and it will show what the problem is. It may be that your MySQL configuration file's settings regarding InnoDB do not match how the files are setup. – daemonofchaos Jan 15 '12 at 17:59
  • Ok, I've got it to work. I installed WAMPServer, copied and pasted the whole data directory, went into phpmyadmin, exported it, and then got back to the normal mysql install package. Don't ask me why it worked, but it did. – e__ Jan 15 '12 at 18:18
  • It worked because the ibdata files were rebuilt properly during the import. Glad you got it working. – daemonofchaos Jan 16 '12 at 03:23
1

It worked because if you used the default export from phpmyadmin, it writes the dump to a sql file with an insert script.

Rob
  • 21
  • 2
0

Ok, I've got it to work. I installed WAMPServer, copied and pasted the whole data directory, went into phpmyadmin, exported it, and then got back to the normal mysql install package. Don't ask me why it worked, but it did.

e__
  • 61
  • 1
  • 7