• Hi All,
    I unnoticeable changed URL at the “General” setting and I couldn’t able to log in to admin page.
    Then I have found one information about ” how to solve this porblem” and I following insturcution:
    Changing the URL directly in the database
    If you know how to access phpMyAdmin on your host, then you can edit these values directly to get you up and running again.
    1. Backup your database and save the copy off-site.
    2. Login to phpMyAdmin.
    3. Click the link to your Databases.
    4. A list of your databases will appear. Choose the one that is your WordPress database.
    5. All the tables in your database will appear on the screen.
    6. From the list, look for wp_options. Note: The table prefix of wp_ may be different if you changed it when installing.
    7. Click on the small icon indicated as Browse.
    8. A screen will open with a list of the fields within the wp_options table.
    9. Under the field option_name, scroll down and look for siteurl.
    10. Click the Edit Field icon which usually is found at the far left at the beginning of the row.
    11. The Edit Field window will appear.
    12. In the input box for option_value, carefully change the URL information to the new address.
    13. Verify this is correct and click Go to save the information.
    14. You should be returned to your wp-options table.
    15. Look for the home field in the table and click Edit Field. Note There are several pages of tables inside wp_options. Look for the > symbol to page through them.
    16. In the input box for option_value, carefully change the URL information to the new address.
    17. Verify this is correct and click Go to save the information.
    18. Delete the folder wp-content/cache (this is a new folder added with WordPress 2.0).
    19. That is it.

    And when I have done and try to access to my blog it appears “Error establishing a database connection”.
    I am assured that I have done with great cared and following exact procedures.
    Thanks for the advice for above problems..

Viewing 6 replies - 1 through 6 (of 6 total)
  • Don’t see what you could have done to cause the database connection error. Make sure you know the database name, database user, database password, and database host, and verify that the information in your wp-config.php file is correct for those values.

    Thread Starter aungkyawsan

    (@aungkyawsan)

    Dear Michaelh,
    I know that that questions has been asked by a lot peoples and I am really in trouble because of data on my blog. If I can get you email or any contact, I would like to give you all User Name pasword to the hosting. I have hosted on https://www.byethost.com. Please help me..I am from Burma..
    I really need to get these data…
    WHere and how can I find wp-config.php?
    Regards,
    James

    Leave your email address here and I will contact you.

    If you haven’t already seen the following video, it may help you find the problem.

    https://educhalk.org/blog/?p=148

    superuserkevin

    (@superuserkevin)

    In wp-config.php I changed To this code:

    /** MySQL hostname */
    define('DB_HOST', '127.0.0.1');

    FROM this code:

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    Despite the database user being set in mysql to have permission to connect to ‘localhost’ and ‘%’ it wouldn’t go with the ‘localhost’ set in wp-config.php but with the ip address it worked.
    Black Magic is my only explanation for this behavior.

    superuserkevin

    (@superuserkevin)

    On a Mac form it was said that changing ‘localhost’ to ‘Localhost’ also works on a Mac. This is what I was installing on and confirm that either ‘Localhost’ or ‘127.0.0.1’ do work.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error establishing a database connection problems’ is closed to new replies.