Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   MySQL Wordpress transfer problem. Please HELP! (https://www.warriorforum.com/programming/830031-mysql-wordpress-transfer-problem-please-help.html)

kylenelson24 14th August 2013 12:16 PM

MySQL Wordpress transfer problem. Please HELP!
 
I am trying to transfer a site that I bought. It comes from a different host. I made a new data base and tried to upload the sql file. I get this error.
Error SQL query:
--
-- Database: information_schema

CREATE DATABASE information_schema DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
MySQL said: Documentation
1044 - Access denied for user 'chirops0'@'localhost' to database 'information_schema'

How do i fix this?

bapparabi 14th August 2013 12:34 PM

Re: MySQL Wordpress transfer problem. Please HELP!
 
can you provide detail info like database so i can test it ..in local machine and tell you the solution

saxatwork 14th August 2013 12:51 PM

Re: MySQL Wordpress transfer problem. Please HELP!
 
Kyle,

If you have downloaded the entire database, you may not be able to upload them to the new one because it would also include some of the system databases. INFORMATION_SCHEMA is one of them, and is related to the MySQL setup on your old host.

What you need to do is open up PHPMyAdmin (if you have it in your old setup), choose Export, select the databases that you want and download them as a SQL file. New host means new databases and users will need to be created and . Then you could come back to your new host and upload them. If you are using cPanel on a shared host, then you would have to create the databases and users individually, and upload the data for each of them separately. For dedicated hosts you would have much more control and should be able to upload the SQL file directly.

peteJ 14th August 2013 12:58 PM

Re: MySQL Wordpress transfer problem. Please HELP!
 
Sounds like one of two problems.

Either your trying to copy an entire database into a database which already includes ones of the same name your trying to copy.

Or, it may be whatever code your trying to run has invalid credentials.

ineagu 14th August 2013 03:54 PM

Re: MySQL Wordpress transfer problem. Please HELP!
 
If you use cPanel you can allow from there a particular user to access the required database, but looks that you are uploading in the wrong one. If you can send me the login details, I can fix it for you .

Kingfish85 14th August 2013 03:59 PM

Re: MySQL Wordpress transfer problem. Please HELP!
 
Quote:

Originally Posted by ineagu (Post 8398180)
If you use cPanel you can allow from there a particular user to access the required database, but looks that you are uploading in the wrong one. If you can send me the login details, I can fix it for you .

^This. You're not importing into the correct database. I'd recommend contacting your web host - they should be able to either do it for you quickly or explain what you need to do.

RobinInTexas 14th August 2013 04:05 PM

Re: MySQL Wordpress transfer problem. Please HELP!
 
If you have access to the site on the old host it would be better to use one of the free transfer plugins to do the job.

I use xcloner. That would get around your problem and do the whole job in about 10 minutes.

mojojuju 14th August 2013 04:11 PM

Re: MySQL Wordpress transfer problem. Please HELP!
 
Quote:

Originally Posted by kylenelson24 (Post 8397462)
I am trying to transfer a site that I bought. It comes from a different host. I made a new data base and tried to upload the sql file. I get this error.
Error SQL query:
--
-- Database: information_schema

CREATE DATABASE information_schema DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
MySQL said: Documentation
1044 - Access denied for user 'chirops0'@'localhost' to database 'information_schema'

How do i fix this?

I'm going to assume that you're importing this sql file using phpMyAdmin and not the command line. Either way, you're probably on a host that doesn't allow you to run the CREATE DATABASE command like that. You probably don't have privileges to do that.

If that's the case (that you can't create a database using raw MySQL syntax from a file), as it likely is if you're using most shared hosting providers, then you'll probably need to create the database first using cPanel.

Once you've created your database, then edit your SQL file to omit the line with the CREATE DATABASE command. Then load the SQL in the file using phpMyAdmin or whatever you're using.

I'm somewhat certain that was the problem. I could be wrong.

Kingfish85 14th August 2013 06:20 PM

Re: MySQL Wordpress transfer problem. Please HELP!
 
Quote:

Originally Posted by mojojuju (Post 8398218)
I'm going to assume that you're importing this sql file using phpMyAdmin and not the command line. Either way, you're probably on a host that doesn't allow you to run the CREATE DATABASE command like that. You probably don't have privileges to do that.

If that's the case (that you can't create a database using raw MySQL syntax from a file), as it likely is if you're using most shared hosting providers, then you'll probably need to create the database first using cPanel.

Once you've created your database, then edit your SQL file to omit the line with the CREATE DATABASE command. Then load the SQL in the file using phpMyAdmin or whatever you're using.

I'm somewhat certain that was the problem. I could be wrong.

INFORMATION_SCHEMA is the information database, the place that stores information about all the other databases. The OP is trying to import the database they have into the WRONG database. You need to select the newly created database and import into that one.

mojojuju 14th August 2013 07:52 PM

Re: MySQL Wordpress transfer problem. Please HELP!
 
Quote:

Originally Posted by Kingfish85 (Post 8398574)
INFORMATION_SCHEMA is the information database, the place that stores information about all the other databases.

Okay, I didn't even notice the name of the database.

Quote:

Originally Posted by Kingfish85 (Post 8398574)
The OP is trying to import the database they have into the WRONG database. You need to select the newly created database and import into that one.

Well, yeah, but except that's not going to work for him because as long as his SQL file has the line CREATE DATABASE information_schema ..... then it doesn't matter which database he's trying to import into because he's essentially telling MySQL to create the information_schema database, and he doesn't have privileges to do that, so he's going to get the same error no matter what he does.

What seems to have happened is that the dude that gave him the Wordpress site didn't just dump the one database for the Wordpress site like he should have, but he just went into phpmyadmin and went to "Export" and then chose the "Quick" method which by default exports all the databases.

OP needs to edit his SQL file and remove the lines pertaining to the creation of the information_schema database, its tables, along with all the inserts. If he doesn't, he'll get the same Access denied error.

And as you mentioned, he's got to either create a database with the same name as the wordpress database in the SQL file, or edit his SQL file to match the name of his newly created database.

kylenelson24, you should ask the guy you got these sites from to give you an export that doesn't include the information_schema database. You might also find it easier if he gives you a SQL dump that doesn't include any CREATE DATABASE statement for the table since you need to create the database yourself.


All times are GMT -6. The time now is 01:44 AM.