• When I go to this url: http://www.missionuganda.info …I get an error message which reads “error establishing a database connection.

    >>> Can someone help me? <<<

    MySQL Databse Information:
    Host Name: ugandadatabase.db.5249676.hostedresource.com
    Database Name: name here
    Description: uganda
    User Name: name here

    My wpconfig file reads:

    <?php
    /**
     * The base configurations of the WordPress.
     *
     * This file has the following configurations: MySQL settings, Table Prefix,
     * Secret Keys, WordPress Language, and ABSPATH. You can find more information by
     * visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
     * wp-config.php} Codex page. You can get the MySQL settings from your web host.
     *
     * This file is used by the wp-config.php creation script during the
     * installation. You don't have to use the web site, you can just copy this file
     * to "wp-config.php" and fill in the values.
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'redacted.com');
    
    /** MySQL database username */
    define('DB_USER', 'ugandadatabase');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'redacted');
    
    /** MySQL hostname */
    define('DB_HOST', 'redactedcom');
    
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');
    
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    
    /**#@+
     * Authentication Unique Keys.
     *
     * Change these to different unique phrases!
     * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     *
     * @since 2.6.0
     */
    define('AUTH_KEY', 'ndS2%D*S#nJqJO=55y&q');
    define('SECURE_AUTH_KEY', 'ndS2%D*S#nJqJO=55y&q');
    define('LOGGED_IN_KEY', '%U@BWhHfHVgJ&1pvP*a4');
    define('NONCE_KEY', 'QY#4y##cJPXv&kXRIg9$');
    /**#@-*/
    
    /**
     * WordPress Database Table prefix.
     *
     * You can have multiple installations in one database if you give each a unique
     * prefix. Only numbers, letters, and underscores please!
     */
    $table_prefix  = 'wp_';
    
    /**
     * WordPress Localized Language, defaults to English.
     *
     * Change this to localize WordPress.  A corresponding MO file for the chosen
     * language must be installed to wp-content/languages. For example, install
     * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
     * language support.
     */
    define ('WPLANG', '');
    
    /* That's all, stop editing! Happy blogging. */
    
    /** WordPress absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
Viewing 5 replies - 1 through 5 (of 5 total)
  • You say:
    Database Name: ugandadatabase

    But your wp-config.php says:
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘redacted.com’);

    You need to tweak your wp-config.php so that it points to your database: define(‘DB_NAME’, ‘ugandadatabase’);

    Thread Starter paul4ut

    (@paul4ut)

    Still having a problem with this. When I go to: http://www.missionuganda.info
    …I get the same error message: Error establishing a database connection

    Could you take another look at my settings to tell me what I’m doing wrong? MANY THANKS!

    MySQL Databse Information:
    Host Name: ugandadatabase.db.5249676.hostedresource.com
    Database Name: ugandadatabase
    Description: uganda
    User Name: ugandadatabase

    My wpconfig file reads:

    <?php
    /**
    * The base configurations of the WordPress.
    *
    * This file has the following configurations: MySQL settings, Table Prefix,
    * Secret Keys, WordPress Language, and ABSPATH. You can find more information by
    * visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
    * wp-config.php} Codex page. You can get the MySQL settings from your web host.
    *
    * This file is used by the wp-config.php creation script during the
    * installation. You don’t have to use the web site, you can just copy this file
    * to “wp-config.php” and fill in the values.
    *
    * @package WordPress
    */

    // ** MySQL settings – You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘name here’);

    /** MySQL database username */
    define(‘DB_USER’, ‘user here’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘password’);

    /** MySQL hostname */
    define(‘DB_HOST’, ‘ugandadatabase’);

    /** Database Charset to use in creating database tables. */
    define(‘DB_CHARSET’, ‘utf8’);

    /** The Database Collate type. Don’t change this if in doubt. */
    define(‘DB_COLLATE’, ”);

    /**#@+
    * Authentication Unique Keys.
    *
    * Change these to different unique phrases!
    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
    * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
    *
    * @since 2.6.0
    */
    define(‘AUTH_KEY’, ‘ndS2%D*S#nJqJO=55y&q’);
    define(‘SECURE_AUTH_KEY’, ‘ndS2%D*S#nJqJO=55y&q’);
    define(‘LOGGED_IN_KEY’, ‘%U@BWhHfHVgJ&1pvP*a4’);
    define(‘NONCE_KEY’, ‘QY#4y##cJPXv&kXRIg9$’);
    /**#@-*/

    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each a unique
    * prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = ‘wp_’;

    /**
    * WordPress Localized Language, defaults to English.
    *
    * Change this to localize WordPress. A corresponding MO file for the chosen
    * language must be installed to wp-content/languages. For example, install
    * de.mo to wp-content/languages and set WPLANG to ‘de’ to enable German
    * language support.
    */
    define (‘WPLANG’, ”);

    /* That’s all, stop editing! Happy blogging. */

    /** WordPress absolute path to the WordPress directory. */
    if ( !defined(‘ABSPATH’) )
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . ‘wp-settings.php’);

    The

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

    will not be correct
    it is more likely the 1st one you posted like so:

    /** MySQL hostname */
    define('DB_HOST', 'ugandadatabase.db.5249676.hostedresource.com');

    Thread Starter paul4ut

    (@paul4ut)

    …ok, I changed it as follows:

    /** MySQL hostname */
    define(‘DB_HOST’, ‘ugandadatabase.db.5249676.hostedresource.com’);

    Now I’m getting a new error message: Page Not Found

    Any idea what I’m doing wrong?

    that’s godaddy’s standard page not found image…

    did you change anything after you installed WP? like the url in settings or anything? Move any files?

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

The topic ‘Error establishing a database connection’ is closed to new replies.