Did a backup of xampp mysql database, trying to restore!

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Did a backup of xampp mysql database, trying to restore!

Postby createch » 26. July 2010 14:14

Hi all,

I did a backup of my mysql database (via phpmyadmin export) before I formatted my laptop, I also backed up the entire xampp folder (including htdocs).

i am trying to restore the database back to previous settings but it keeps throwing up an error regarding duplicate tables and entries - then ceases.

Is there a way to import whilst ignoring tables that are already there? i.e information scheme.

Any help would be appreciated :)

many thanks

Posts: 1
Joined: 26. July 2010 14:11

Re: Did a backup of xampp mysql database, trying to restore!

Postby JonB » 26. July 2010 14:49

In Short: Name the databases to be restored.

Long form explanation -

MySQL is never ONE database, There are always 'information_schema' and 'mysql' - all the rest are created by user SQL processes -- this is your user-defined data. (Joomla, your custom data, WordPress or whatever) In your case, there is also likely a 'phpmyadmin'. On a new installtion or a re-install, you should only be restoring the databases that contain user-defined data.

With a CLEAN XAMPP install - configure XAMPP & MySQL until you have phpMyAdmin working. Next, configure your admin/root account and any users you created plus their passwords as they were on your OLD server. You may have some pernissions thingies to fix (GRANT statements). NOW - restore the user-defined databases.

Although there may be other ways to go about things, this lets YOU know what is happening, and if a step goes amiss - YOU know what was last done.

You'll want to look at your old config.inc.php wihch contains your old phpMyAdmin settings.

HINT: you can read through your backup, its just a huge script of SQL statements to be executed.

Good Luck.
User avatar
AF Moderator
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Did a backup of xampp mysql database, trying to restore!

Postby JustMe » 27. July 2010 00:21


If you did an export, you should have all your data. When you try to import, if you get an error that the files already exist, is this what you expected? If this was a clean install, they shouldn't.

If you are installing the backup over an older MySQL implementation, then you probably forgot to check the "drop tables" checkbox when you did the export.

In any case, it almost sounds like you restored the MySQL data when you restored the XAMPP folder. If that is the case, then you may already have everything you need.

But if you want to force the export to install, simply identify all the tables and add a "drop table xxxx" to the beginning of the SQL for each table you are trying to import.

Posts: 12
Joined: 22. March 2010 20:34

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 42 guests