Page 1 of 1

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

PostPosted: 26. July 2010 14:14
by createch
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

Nick

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

PostPosted: 26. July 2010 14:49
by JonB
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.
:D

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

PostPosted: 27. July 2010 00:21
by JustMe
Nick,

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.

JustMe