Trouble Restoring Database

Status
Not open for further replies.

BlueIce

New Member
Messages
113
Reaction score
0
Points
0
Hi,

I'm having trouble restoring my database. Whenever I try to dump it in PHPMyAdmin, I always get this error:

Error at the line 12: CREATE DATABASE `blueice_db1` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

I have set all permissions to blueice_db1 and I don't know what that error states, but that is the line 12 of my database.

Thanks in advance.

server: cossacks
 

bugfinder

Retired
Messages
2,260
Reaction score
0
Points
0
Most likely its telling you the database already exists, if you're restoring it chances are you want to either drop the database, or, just empty the tables and comment that create db line out.
 

BlueIce

New Member
Messages
113
Reaction score
0
Points
0
Yes, I want to drop the whole database and overwrite my existing x10 database because it's empty. How do I go about doing that?

Thanks in advance.
Edit:
Can anyone help me on this?
 
Last edited:

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
Try this..
Code:
CREATE TABLE IF NOT EXISTS `tablename`.......
 

bugfinder

Retired
Messages
2,260
Reaction score
0
Points
0
Or add

drop database blueice_db1

at the front - but I really doubt we'd have create db permissions so as kajasweb said you can either do a create if not exists, or, remove the db create line as I suggested and then before each create table line in your sql script add a drop table xxxx line where xxxx is the name of the table..
 

BlueIce

New Member
Messages
113
Reaction score
0
Points
0
Thank you, I will try the suggested approach.

Edit:
I seem to have solved the problem, with the aide of a few friends. The error was about line 12, and removing that from my SQL database paved way to my successful import.
 
Last edited:
Status
Not open for further replies.
Top