• Resolved ioreyes

    (@ioreyes)


    Hi, I’m a newbie so please bear with me πŸ™‚

    I followed the installation instructions for cpanel at codex.ww.wp.xz.cn to the letter. However, whenever I try to access http://www.example.com/wordpress/ I receive the following error message:

    “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 localhost. This could mean your host’s database server is down.”

    I double checked my user name, database name, and password and they’re all correct. My host is up and running.

    The following is what’s in MySQL:

    Users in wordpress
    XXXX_ (Privileges: ALL PRIVILEGES)

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

    The following is what appears in my wp-config.php file:

    <?php
    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘XXXX_wordpress’); // The name of the database
    define(‘DB_USER’, ‘XXXX_’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘YYYY’); // …and password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

    // 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__).’/’);
    require_once(ABSPATH.’wp-settings.php’);
    ?>

    I haven’t the faintest idea how to fix this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I assume the XXXX = your login/username to the site via cPanel.
    However, in my version the DB username is XXXX_whatever = whatever being the name of the user I’ve created only for that DB.

    Thread Starter ioreyes

    (@ioreyes)

    Thanks for the quick reply!

    XXXX is my username for cPanel, but XXXX_ is the user name MySQL created for me. Do you recommend my changing the user name and setting up the DB again?

    Are the two instances of XXXX the same?
    I mean suppose, XXXX=moshu, then
    DB name – moshu_wordpress
    DB user – moshu_ ?
    In my cPanel I create the Db and I create the user in it – Mysql only “prefixes” the username and db name.

    I don’t know what to say, but I’d give it a shot by creating a username (i.e. not leaving empty after the _ [underscore])

    Thread Starter ioreyes

    (@ioreyes)

    Ok Thanks! I’ll try that.

    πŸ™‚

    Thread Starter ioreyes

    (@ioreyes)

    Hi moshu –

    It worked! I deleted my user name & the DB. I created a new user name that didn’t resemble my cPanel log in, a new database (using the same name I used before), then added the user to the DB. I edited the wp-config.php file then uploaded it. And now the thing is working. Thanks so much! πŸ˜€

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘error message re: wp-config’ is closed to new replies.