Error when importing

Hi

I’m trying to import .sql file from phpmyadmin but I am getting this error:

Error

SQL query:


– Database: cdcol

CREATE DATABASE cdcol DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;

MySQL said: Documentation
#1007 - Can’t create database ‘cdcol’; database exists

what could be the problem and what do I need to do?
Many thanks

the problem is, the database already exists

what to do? nothing :smiley: :smiley:

oh you know what I’m trying to do? I’m trying to import it to the same one lol

I wouldn’t have known unless you clarified that for me so thanks

please note this is the first time i’m doing this!!!

always nice to have a second pair of eyes, eh

:cool:

ok so I have a .sql file ( from my localhost ) and I’m trying to import it to my hosted site but now I am getting this error:

SQL query:

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;

/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;

/*!40101 SET NAMES utf8 */;


– Database: cdcol

CREATE DATABASE cdcol DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;

MySQL said: Documentation
#1044 - Access denied for user ‘hantaah’@‘%’ to database ‘cdcol’

have you created a mysql user called hantaah? have you given them permission to access that database? sounds lik e you have not.

Hi

when I created the database I had to create a user to access the phpmyadmin so I created a database and password. There is also another user there called cdcol.

when I access the phpmyadmin under cdcol there is no option to import. When I access the phpmyadmin under hantaah on the left it has the database name like this:

wpqps ( 1 )
cds

when I go to import I get this error:

Error

SQL query:

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;

/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;

/*!40101 SET NAMES utf8 */;


– Database: cdcol

CREATE DATABASE cdcol DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;

MySQL said: Documentation
#1044 - Access denied for user ‘hantaah’@‘%’ to database ‘cdcol’

Ok I have some more info, apparently the server I am trying to import it on ihas some issues with my .sql file and their database has a difference between my Database dump.

I have to check errors in my .sql file.
what should be my next step?

I’m trying to import a .sql file to my database but there are incompatibility issues and so I need to fix errors in the file.

does anyboady know what I need to do to get the file to upload?

based on the amount of information you have provided, i would say you need to fix the errors

Can you give me some more direction about that as i have no idea about sql files or databases. I was following a tutorial on importing when I came across the error then I was told that the errors are due to incompatibilities and I need to fix the errors so I’m none the wiser

with regards to the .sql file I created I went into my local host and exported it to a .sql file, then I opened it in dreamweaver and found and replaced all the http://localhost/wordpress to http://www.mywebsite.com. I also looked for a download file to change but couldn’t find one.

Would it be anything to do with that? How do I look for and fix errors in the file?

if there are errors in the file, we would need to see the error message you got, and the line in the file that caused it

Ok how can I get that information?

i’m not sure

what are you doing when you try to import your .sql file?

I have the .sql file on my pc that I exported from my localhost database. Then I signed in to my hosting account and accessed phpmyadmin. I clicked on the database I created and clicked on import, searched for the file on my pc and clicked go I get this error:

SQL query:

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;

/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;

/*!40101 SET NAMES utf8 */;


– Database: cdcol

CREATE DATABASE cdcol DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;

MySQL said: Documentation
#1044 - Access denied for user ‘hantaah’@‘%’ to database ‘cdcol’

this is the same problem you had in your other thread, right?

you need to create that user with access privileges for that database

yep same problem but no reply to the latest as I stated the issue was to do with the errors not the the user. I contacted the hosting company and they told me it was because of the compatibility issues and that I need to sort out the erros. As stated above I created a database and a user, unless i’m mossing something but In all cases I’m still stuck

Can anyone advice as there has been a database and user created but I’m told I need to fix errors in sql file - I do not know how to do this can someone help?

Many thanks