If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / Trying to transfer SQL dump from one database to another

Trying to transfer SQL dump from one database to another

Started by datatv on 30 Jun 2012, 5:14 PM · Views: 1,258

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?

20 years a Zencart User

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,512
Plugin Contributions:
176

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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.