Title: Err DB Connection
Last modified: August 18, 2016

---

# Err DB Connection

 *  [yonnermark](https://wordpress.org/support/users/yonnermark/)
 * (@yonnermark)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/err-db-connection/)
 * Hi all (first time user here)
    I just uploaded all the files including a [hopefully]
   correctly edited wp-config.php file but I get the following error message when
   accessing the install.php file: [quote]Error establishing a database connection!
   This probably means that the connection information in your wp-config.php file
   is incorrect. Double check it and try again.[/quote] I’ve definately got the 
   database name & password correctly so we can rule that one out. What about the
   hostname? How do I find out what to put there? (WP says that 99% of the time 
   the hostname can be left as default so I doubt this is the problem either) My
   server is PHP & MySQL compatible Any ideas for me? I appreciate the time anyone
   spends responding and I will definately come back to read any responses Thanks
   Mark

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

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/err-db-connection/#post-76335)
 * Your hostname should be written somewhere on your site’s control panel.
    Have
   a look there for connection details, or if you have phpmyadmin, log into that
   and look toward the top of the screen – your username and the connection detail
   will be at the top of the screen. It could be an IP address – looking something
   like 217.195.137.116 – or the database name itself.
 *  Thread Starter [yonnermark](https://wordpress.org/support/users/yonnermark/)
 * (@yonnermark)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/err-db-connection/#post-76336)
 * could it be to do with CHMOD settings?
    All the root php files are currently 
   644. Is that OK? I tried changing the wp-config/php file to 755 but I got the
   same message so I changed it back
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/err-db-connection/#post-76337)
 * Nope, chmod is nothing to worry about yet.
 *  Thread Starter [yonnermark](https://wordpress.org/support/users/yonnermark/)
 * (@yonnermark)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/err-db-connection/#post-76339)
 * Thanks, I found the following in phpmyadmin:
    [quote]MySQL 4.0.20-standard running
   on localhost as [xxxxxx@localhost[/quote]](https://wordpress.org/support/topic/err-db-connection/xxxxxx@localhost[/quote]?output_format=md)
   xxxxxx is actually my username – I didn’t want to post it. Does that help? I 
   guess my hostname is localhost? But my wp-config.php already says: (‘DB_HOST’,‘
   localhost’) Any further suggestions? Mark
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/err-db-connection/#post-76342)
 * Well your name is there, the password is the same, and we know it’s localhost.
   
   The only other thing is the database name itself. Have you already created the
   name of the database within mysql itself ? Again, phpmyadmin will allow you to
   create a database.
 *  Anonymous
 * [21 years, 10 months ago](https://wordpress.org/support/topic/err-db-connection/#post-76348)
 * Hi –
    You might want to verify that mysqld is actually listenening to localhost:
   3306 (default) . My guess is it’s not. So, try this, do ‘netstat -a’ at the command
   line – if you see something that looks like a socket for mysqld (IE: /var/run/
   mysqld/mysqld.socket) place that in your wp-config.php (IE: define(‘DB_HOST’,‘:/
   var/run/mysqld/mysqld.sock’); ) Note the colon at the beginning of the socket.
   Hope this helps. 6
 *  Anonymous
 * [21 years, 10 months ago](https://wordpress.org/support/topic/err-db-connection/#post-76350)
 * Listen to 6. My previous suggestions were idiotic.

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

The topic ‘Err DB Connection’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 7 replies
 * 3 participants
 * Last reply from: Anonymous
 * Last activity: [21 years, 10 months ago](https://wordpress.org/support/topic/err-db-connection/#post-76350)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
