WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Moved my blog to a new hosting co, now can't establish db connection! (19 posts)

  1. seogirl
    Member
    Posted 8 years ago #

    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!

  2. moshu
    Member
    Posted 8 years ago #

    What about the database name, user name and password? Did you put the new data into the wp-config file?

  3. seogirl
    Member
    Posted 8 years ago #

    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.

  4. moshu
    Member
    Posted 8 years ago #

    When you created the user in cPanel, did you click the "Add user to database" button?? (94% of people forget that :)

  5. seogirl
    Member
    Posted 8 years ago #

    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!!!

  6. moshu
    Member
    Posted 8 years ago #

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

  7. seogirl
    Member
    Posted 8 years ago #

    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.

  8. moshu
    Member
    Posted 8 years ago #

    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 ***)

  9. seogirl
    Member
    Posted 8 years ago #

    Yes, excatly identical to that.

    Bummer.

  10. moshu
    Member
    Posted 8 years ago #

    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

  11. seogirl
    Member
    Posted 8 years ago #

    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?

  12. seogirl
    Member
    Posted 8 years ago #

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

  13. moshu
    Member
    Posted 8 years ago #

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

  14. moshu
    Member
    Posted 8 years ago #

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

  15. moshu
    Member
    Posted 8 years ago #

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

  16. seogirl
    Member
    Posted 8 years ago #

    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! :-)

  17. moshu
    Member
    Posted 8 years ago #

    It's too late now - but if you cannot figure it out, you can email me at my name here at mydomain, with the access info and I'll take a look at it tomorrow morning.
    Trust me, you are not the first one I helped in this way :)

  18. seogirl
    Member
    Posted 8 years ago #

    Yes, I recognize your name. You're one of the "good guys" :-)

    And yes, it is late.

    We'll pick this up tomorrow. THANK YOU!!

  19. seogirl
    Member
    Posted 8 years ago #

    moshu,

    I don't know what the hosting company did, but some how they got it working. Thanks for being willing to help so much. You're great.

Topic Closed

This topic has been closed to new replies.

About this Topic