importing a database to phpmyadmin

Status
Not open for further replies.

nsprink

New Member
Messages
6
Reaction score
0
Points
0
I few weeks ago my website databases were hacked or something so I deleted them. I have a back up and want to put them in but i'm getting this error when I try to import into phpmyadmin
Error

SQL query:
--
-- Database: `nsprink_joomla`
--
CREATE DATABASE `nsprink_joomla` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


MySQL said:
#1044 - Access denied for user 'nsprink'@'chopin.x10hosting.com' to database 'nsprink_joomla'
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
You have to create the database separately, using one of the cPanel tools, MySQL Databases or MySQL Database Wizard.

You might have to edit the import file too, to remove the CREATE DATABASE part.
 

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
Extract the backup file if it is compressed
open the SQL file and remove the following code
Code:
CREATE DATABASE `nsprink_joomla`
then compress it back and upload it.
 

nsprink

New Member
Messages
6
Reaction score
0
Points
0
now im getting this..and I also tried deleted the default character set code and got another error.

Error

SQL query:
--
-- Database: `nsprink_joomla`
--
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci' at line 1
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
and I also tried deleted the default character set code and got another error.

And what was that error message (since the entire line was supposed to be deleted)?
 

nsprink

New Member
Messages
6
Reaction score
0
Points
0
It was saying it couldnt import the tables (which are the next lines in the .sql file)
 
Status
Not open for further replies.
Top