Title: Error establishing a database connection
Last modified: August 18, 2016

---

# Error establishing a database connection

 *  Resolved [nizamje](https://wordpress.org/support/users/nizamje/)
 * (@nizamje)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-22/)
 * hi,
 * I have a problem, i tried to edit the wp-config.php, but when open my page it
   got error started like this:error establisghing a database connection.
 * my wp-config.php is like this:
    <?php // ** MySQL settings ** // define(‘DB_NAME’,‘
   wordpress’); // The name of the database define(‘DB_USER’, ‘zack’); // Your MySQL
   username define(‘DB_PASSWORD’, ‘*******’); // …and password define(‘DB_HOST’,‘
   localhost’); // 99% chance you won’t need to change this value define(‘DB_CHARSET’,‘
   utf8’); define(‘DB_COLLATE’, ”);
 * // You can have multiple installations in one database if you give each a unique
   prefix
    $table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!
 * // 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. */
 * define(‘ABSPATH’, dirname(__FILE__).’/’);
    require_once(ABSPATH.’wp-settings.
   php’); ?>
 * What should i do now?

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

 *  [tank71](https://wordpress.org/support/users/tank71/)
 * (@tank71)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-22/#post-662570)
 * I would make sure that you are typing in your user name and password correctly.
   Capitals defiantly matter. I would also make sure that mySQL is hosted locally.
   This is something you would have to ask your host.
 *  [jmintia](https://wordpress.org/support/users/jmintia/)
 * (@jmintia)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-22/#post-662850)
 * you should correctly type the Mysql hostname of your web server. like for instance,
   i created an account on Byethost.com web hosting service and they gave me account
   details for my Mysql hostname which is “sql105.byethost13.com”. This should be
   the ‘DB_Host’ value.

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

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

## Tags

 * [database connection](https://wordpress.org/support/topic-tag/database-connection/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 3 participants
 * Last reply from: [jmintia](https://wordpress.org/support/users/jmintia/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-22/#post-662850)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
