WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Moved my blog to a new hosting co, now can’t establish db connection!

[Resolved] Moved my blog to a new hosting co, now can’t establish db connection!

  • I moved to a new hosting company. I backed up my blog (SQL database) and restored on the other end. I went into Cpanel, MySQL and added a user (identical name as at the old host) and gave “all access”.

    Beyond that, I don’t know what to do. I’m not really familair with MySQL or MyPHPAdmin. I’m lost.

    Can anyone tell me what to do? Do I need to repair or update the script in some way. (And if so, how do I do it?).

    Thanks!

Viewing 15 replies - 1 through 15 (of 18 total)
  • What about the database name, user name and password? Did you put the new data into the wp-config file?

    Ok, I didn’t realize this file needed to be updated.

    I went into wp-config with Notepad and updated my datebase name, user name and password I assigned and FTP’d it over.

    I’m still getting the same mesage.

    When you created the user in cPanel, did you click the “Add user to database” button?? (94% of people forget that 🙂

    LOL. No, I hadn’t done that. (This is my first time doing MySQL!)

    Well, that sure did something…..but now the message says,

    “It doesn’t look like you’ve installed WP yet. Try running install.php.”

    Ahhh!!!

    Is the user you’ve created in the same database where you imported the data from your old blog?

    Yes, I beleive so. Here is the panel:

    Databases:
    allkitch_AKSBLOGwrdp1

    Users in AKSBLOGwrdp1
    allkitch_wrdp1 (Privileges: ALL PRIVILEGES)

    Connection Strings
    Perl $dbh = DBI->connect(“DBI:mysql:allkitch_AKSBLOGwrdp1:localhost”,”allkitch_wrdp1″,”<PASSWORD HERE>”);
    PHP $dbh=mysql_connect (“localhost”, “allkitch_wrdp1”, “<PASSWORD HERE>”) or die (‘I cannot connect to the database because: ‘ . mysql_error());
    mysql_select_db (“allkitch_AKSBLOGwrdp1”);

    User: allkitch_wrdp1 Db: allkitch_AKSBLOGwrdp1

    I entered the user, database name and password exactly into wp-config.

    So does it look like this?
    <?php
    // ** MySQL settings ** //
    define('DB_NAME', 'allkitch_AKSBLOGwrdp1'); // The name of the database
    define('DB_USER', ' allkitch_wrdp1'); // Your MySQL username
    define('DB_PASSWORD', '******'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    (with the real pw instead ***)

    Yes, excatly identical to that.

    Bummer.

    Don’t give up 🙂
    In cPanel you can click on the phpMyadmin link – it will open (usually) a new window and you can check whether the data import was really succesful and the data from your old blog really is in the database named allkitch_AKSBLOGwrdp1

    I see it listed on the left hand side of MyPHPAdmin. So, it is in there.
    Is there something else I can check while inside this program?

    under “structure” is says, “no tables found in database”, if that means anything to us.

    Yes. It means that either the import (restore) wasn’t successful… or if it was, the data is sitting in another database 🙂

    When you see it listed on the left a number – (12) – should show how many tables are there in

    Quote from OP:
    I backed up my blog (SQL database) and restored on the other end.
    Are you sure this really happened?

    Absolutely! The file is called: AKSBLOG_wrdp1.gz and after I did the “restore” at the new host, I “saw” it listed in MySQL, where formerly there was no databases.

    When I went through the “restore” (in Cpanel) it said “restoring database” or some such wording as that.

    So, I’m pretty darn sure it’s “yes”. If not, I need serious help! 🙂

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Resolved] Moved my blog to a new hosting co, now can’t establish db connection!’ is closed to new replies.
Skip to toolbar