• Anyone help us with our volunteers blog situated at
    https://lagiraudiere.com/blog/

    Following the upgrade I had problems with images which I tried to resolve I then got the white screen. I am now back to
    Error establishing a database connection
    and if I try to use the admin page I receive

    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at mysql5.namesco.net. This could mean your host’s database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?

    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    As far as I can see all the above are ok. The main worry is I do not have a good back up copy so any advice in recovering our blog would be appreciated
    Regards
    Paul

Viewing 12 replies - 1 through 12 (of 12 total)
  • Well depends who you host with. If you are using cpanel try going into your control panel and resetting the password to the same as in the wp-config.php file again. IF any other control panel you could do the same.

    Also ensure the hostname is correct unless it’s localhost.

    This is definitely a db issue which is usually easy to resolve.

    – First, try contacting the hosting provider if the database server is online / if they have any other problem at their end, or they made any changes to your account, or if there are any limitations/restrictions, if the hosting package is set to Windows and not Linux, etc .

    – double check your wp-config.php file settings for the database name, database username and database password. This is where most errors occur.

    -Then check that you don’t need to change the database host from “localhost” to something else. You can get that info from your hosting provider.

    -Check you have actually created a database with the same database name as is in your wp-config.php file.
    -Last, but not least, if all that information is correct your database probably has a problem with it, and you may need to contact your hosting provider.

    Thread Starter PaulTom

    (@paultom)

    Hey thank you for your help I have raised a support note with my hosting provider for which I await a reply,

    I have double checked the config file with the database and I think they are correct; here are the results minus the password which I would appreciate it if someone could confirm that all is good with these,

    [Database details moderated]

    config file at lagiraudiere.com/web/blog/wp-config.php

    [Code moderated]

    Thanks for your help and your time
    Regards
    Paul
    https://lagiraudiere.com/blog/

    Thread Starter PaulTom

    (@paultom)

    Just realised should the
    /** MySQL database username */
    define(‘DB_USER’, ‘lagirau’);

    be changed to admin or are these two different things or am I loosing the plot here.
    Paul

    You’re losing the plot. ??

    The database user needs to be the user (with full privileges) that you created when you set up the database. It is completely unrelated to any login that you intend to use for WordPress.

    Thread Starter PaulTom

    (@paultom)

    Thank you yes been working on this for over a month now and just seem to be going around in circles all started when I updated to the latest version might just be coincidence but since then problems with images followed by data base errors followed by blank white screen and now back at data base errors.

    Could I just reinstall it without loosing the images, posts and pages ?

    Only if you have a good database backup that you can use to restore the old content on a new install.

    Thread Starter PaulTom

    (@paultom)

    Normally would the hosting provider keep a back up?

    That depends upon the hosts. You’d have to ask yours but, generally speaking, it is your responsibility to backup your own database at regular intervals.

    Thread Starter PaulTom

    (@paultom)

    Here is a reply from my hosting provider which kind of says that my database seems or was ok for https://lagiraudiere.com/blog/

    Dear Paul,
    Thank you for the update.
    It looks as if some of the files, most notably the ‘wp-config.php’ file have become corrupted and a lot of the code has been truncated onto one line.

    The database itself appears intact so I suspect that WordPress will need re-installing into the ‘blog’ directory in order to resolve this issue.

    If you have recently added a plugin or theme to this blog then that might be the culprit behind this corruption.

    Kind Regards,
    Nathan Preedy
    Customer Care Team
    Namesco Limited

    I did not add anything I simply updated. So if I reinstall wordpress how does the new instalation pick up the existing database or do I have to take a backup of the existing database and if so how do I do this?

    Do NOT re-install WordPress. Try re-uploading all files & folders – except the wp-content folder – from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

    You’ll also need to recreate your wp-config.php file but that shouldn’t be too difficult.

    Then run the upgrade manually via wp-admin/upgrade.php

    Thread Starter PaulTom

    (@paultom)

    Hi Thank you all for your advice and help with our volunteers blog at
    https://lagiraudiere.com/blog/
    The blog is now up and running so thanks again to all but just one question you may be able to help with is,

    Once it was running and I could log in and access the blog I had problems loading images. The only way I could load them was via a URL,
    I have changed the CHOMOD? or reset the permissions on uploads folder and contents to 755 and now I can load images My question is this Ok or am I inviting hackers?

    Again thanks for your help todate
    Regards
    Paul

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