tags:

views:

41

answers:

1

I have 2 MySQL databases 1_029f4ab_0 and 1_029f4ab_1

I want to copy the contents of 1_029f4ab_0 into 1_029f4ab_1

The structure of both databases are identical

1) I EXPORTED a wordpress database 1_029f4ab_0 and file was saved as "localhost.sql" to my laptop

2) In myphpadmin, I selected the second wordpress database 1_029f4ab_1 and chose "admin" in order to IMPORT the 1_029f4ab_0 database.

MySQL said: Documentation

1044 - Access denied for user '1_029f4ab_1'@'localhost' to database '1_029f4ab_0'

What am I doing wrong?

A: 

Does your SQL file contain

CREATE DATABASE 1_029f4ab_0;

or

USE 1_029f4ab_0;

If so, delete those lines and re-run it. If you export the database from the top level in PHPmyadmin then sometimes it can add that in

Ben Sykes
Thanks Ben! Now at least I'm past that error. Now I'm getting this one... ERROR -- -- Dumping data for table wp_links -- ... (6, 'wordpress.org/extend/themes', 'Themes', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''), (7, 'p[...] #1062 - Duplicate entry '1' for key 1 –
Scott B
I ended up just dropping every table from my destination db and the import worked fine then.Perhaps that begs another question as to how best to do the export to avoid the duplicate entry errors?
Scott B