[resolved] Can't connect to database (2 posts)

  1. silverfire
    Posted 10 years ago #

    Yes, I know this has been asked before, but I couldn't fix it by reading the other threads. Anyway. I upgraded my blog (http://firegold.net/WordPress) last night, after backing up the database. I neglected to 1) turn off any plugins and 2) make copies of all the actual files.

    After the upgrade, I got the "get_bloginfo" error, then read the help stuff here to see that really meant that the database couldn't be accessed. I checked the username and all that on the database. It's all as it should be. I only have a wp-config and wp-config-extra, no -sample. It was set up with nothing in any of the database fields, so I set it up with the info I had.

    No go.

    Still got the error. I tried various things for the hostname: localhost,, etc. Nothing worked. I even tried a couple different passwords, to no avail.

    Is it possible to fix this, or should I think about just doing a clean install and then importing the posts?

    Any help or advice would be greatly appreciated. The contents of the wp-config file follow. Originally, each of the database fields were ""; It's like the upgrade script Jatol (my webhost) uses didn't populate the fields, which it should have.

    // ** MySQL settings ** //
    $DB_NAME = "slvrfrjj_wp1";
    $DB_USER = "slvrfrjj_wp1";
    $DB_PASSWORD = "*******";
    $DB_HOST = "localhost";

    // Change the prefix if you want to have multiple blogs in a single database.
    $table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_'

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');

    /* Stop editing */

    define('ABSPATH', dirname(__FILE__).'/');

  2. silverfire
    Posted 10 years ago #

    I contacted Jatol, my host, and asked their advice. It was too late to recover the files from their nightly backup, but they suggested I try the "add a new user to the database" route. So I added a new user, gave it permissions, then altered wp-config to match. I ran upgrade.php, and got a success this time.

    Tested the blog out, changed the theme, and everything seems to be working okay. I wonder if I maybe was using the wrong password before.

    Either way, whether I used the wrong password or the one-click upgrade messed up, it's working now, and that's what matters. Just thought I'd post with my results in case it might help other people.

Topic Closed

This topic has been closed to new replies.

About this Topic