MySQL Wordpress transfer problem. Please HELP!

9 replies
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?
#mysql #problem #transfer #wordpress
  • Profile picture of the author bapparabi
    can you provide detail info like database so i can test it ..in local machine and tell you the solution
    {{ DiscussionBoard.errors[8397547].message }}
  • Profile picture of the author saxatwork
    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.
    Signature

    "Be Still Like A Mountain And Flow Like A Great River"

    {{ DiscussionBoard.errors[8397599].message }}
  • Profile picture of the author peteJ
    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.
    {{ DiscussionBoard.errors[8397620].message }}
  • Profile picture of the author ineagu
    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 .
    Signature
    SendinBlue.com - Send 350,000 emails / month for $175
    {{ DiscussionBoard.errors[8398180].message }}
    • Profile picture of the author Kingfish85
      Originally Posted by ineagu View Post

      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.
      Signature

      |~| VeeroTech Hosting - sales @ veerotech.net
      |~| High Performance CloudLinux & LiteSpeed Powered Web Hosting
      |~| cPanel & WHM - Softaculous - Website Builder - R1Soft - SpamExperts
      |~| Visit us @veerotech Facebook - Twitter - LinkedIn

      {{ DiscussionBoard.errors[8398196].message }}
  • Profile picture of the author RobinInTexas
    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.
    Signature

    Robin



    ...Even if you're on the right track, you'll get run over if you just set there.
    {{ DiscussionBoard.errors[8398208].message }}
  • Profile picture of the author mojojuju
    Originally Posted by kylenelson24 View Post

    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.
    Signature

    :)

    {{ DiscussionBoard.errors[8398218].message }}
    • Profile picture of the author Kingfish85
      Originally Posted by mojojuju View Post

      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.
      Signature

      |~| VeeroTech Hosting - sales @ veerotech.net
      |~| High Performance CloudLinux & LiteSpeed Powered Web Hosting
      |~| cPanel & WHM - Softaculous - Website Builder - R1Soft - SpamExperts
      |~| Visit us @veerotech Facebook - Twitter - LinkedIn

      {{ DiscussionBoard.errors[8398574].message }}
      • Profile picture of the author mojojuju
        Originally Posted by Kingfish85 View Post

        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.

        Originally Posted by Kingfish85 View Post

        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.
        Signature

        :)

        {{ DiscussionBoard.errors[8398801].message }}

Trending Topics