Zen Cart Logo
Forums / General Questions / Trying to transfer SQL dump from one database to another

Trying to transfer SQL dump from one database to another

Views: 1,244

Results 1 to 4 of 4
30 Jun 2012, 5:14 PM
#1
datatv avatar

datatv

Zen Follower

Join Date:
Jun 2008
Posts:
170
Plugin Contributions:
0

Trying to transfer SQL dump from one database to another

Trying to import my SQL file from one database to another and I go to PHPmyAdmin and try to import it and get this error instead.

--
-- Current Database: db60293_store

CREATE DATABASE /!32312 IF NOT EXISTS/ db60293_store /*!40100 DEFAULT CHARACTER SET latin1 */;

MySQL said: Documentation
#1044 - Access denied for user 'dbXXXXXX'@'%' to database 'db60293_store'

db60293 is the old database. I don't know how to edit a SQL file. Can I just bring it into Excel and make changes to it? I think this is ZC 1.3.8a although I'm not certain of that. I plan to upgrade to 1.5 once this is completed. But this import needs to be made first.

30 Jun 2012, 6:12 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Trying to transfer SQL dump from one database to another

datatv:

Can I just bring it into Excel and make changes to it?

NO !!!

Do not bring excel anywhere near your database!

Have you CREATED a new database first?

30 Jun 2012, 6:34 PM
#3
datatv avatar

datatv

Zen Follower

Join Date:
Jun 2008
Posts:
170
Plugin Contributions:
0

Re: Trying to transfer SQL dump from one database to another

Yes, the new DB is installed.

3 Jul 2012, 9:13 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Trying to transfer SQL dump from one database to another

How to make a database backup:
http://www.zen-cart.com/content.php?144-how-can-i-do-a-database-backup-with-phpmyadmin

You obviously skipped step 2: "select your database from the pulldown on the left BEFORE exporting". If you don't pre-select your database from the list, then the CREATE DATABASE statement will be included in the export. And then, since most hosts don't let you create databases using raw SQL statements like CREATE DATABASE, you'll get the error you reported.