Title: WP not seeing database
Last modified: August 18, 2016

---

# WP not seeing database

 *  [chenks](https://wordpress.org/support/users/chenks/)
 * (@chenks)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/)
 * installing a clean new wordpress installation
 * wp 2.0.5
    mysql 5.0.27 php 5.2.0 windows 2003 / IIS6
 * have created the database and user.
    edited wp-config.php as appropriate.
 * but WP says it can’t connect
 * —-
    Error establishing a database connection 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 192.168.1.5. This could mean your host’s database
   server is down. —-
 * everything as far as i can see is set correctly in MySQL.. so any ideas why WP
   says it can’t see it.
 * other sites on the server are not having problems connecting to other databases
   within MySQL.

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

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480646)
 * _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 **192.168.1.5.**
   This could mean your host’s database server is down._
 * why are you using a private IP for the ip? is this on a lan, cuz thats not going
   to be resolvable unless it its on that network. localhost is the typical setting
   for that, assuming, of course, that mysql is on the same box.
 *  Thread Starter [chenks](https://wordpress.org/support/users/chenks/)
 * (@chenks)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480647)
 * the user pass is correct… as i just created the user account for the database
   and then typed it into wp-config.
 * the database is running fine, as the other website can access it fine.
 * 192.168.1.5 *is* localhost – i have tried it with both and doesn’t work with 
   either.
 *  Thread Starter [chenks](https://wordpress.org/support/users/chenks/)
 * (@chenks)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480648)
 * should also add… this is when i am trying to run wp-admin/install.php
 *  Thread Starter [chenks](https://wordpress.org/support/users/chenks/)
 * (@chenks)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480654)
 * have also just tried to get it to use an existing database that is working with
   another site…. still same error. WP says is can’t connect or see the database.
 * so what’s going wrong here?
 *  [articles](https://wordpress.org/support/users/articles/)
 * (@articles)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480655)
 * Try this:
    make a new php file with the following content, change user_name and
   pass (and blog, if you use a different table-name) and upload it to your server.
   It will establish a database-connection, search for the optuin siteurl and echo
   it.
 * <?php
    $dbi=mysql_connect(“localhost”,”user_name”,”User_pass”); mysql_select_db(“
   blog”); $result = mysql_query(“select option_value from wp_options where option_name
   like ‘siteurl'”, $dbi); list($siteurl) = mysql_fetch_row($result); echo $siteurl;?
   >
 *  Thread Starter [chenks](https://wordpress.org/support/users/chenks/)
 * (@chenks)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480656)
 * the database is empty at the moment.. as the install.php can’t set anything up.
 * so that script won’t find a “siteurl” as it doesn’t exist yet
 *  [gaefke](https://wordpress.org/support/users/gaefke/)
 * (@gaefke)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480668)
 * I have the same problem, and in others websites. Only in a one domain I can install
   a WP…in the others a I receive the same response:
    “Can’t select database We 
   were able to connect to the database server (which means your username and password
   is okay) but not able to select the prg7_Mambo database.
 * Are you sure it exists?
    On some systems the name of your database is prefixed
   with your username, so it would be like username_wordpress. Could that be the
   problem?” I execute the SQL and create the tables in BD and the message is the
   same… But I´ll try more and more… Gaefke, Paulo Roberto
 *  [gaefke](https://wordpress.org/support/users/gaefke/)
 * (@gaefke)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480669)
 * Success.
    In your PHPMyAdmin see de information about the user: meaning this:
   User: prg7@localhost And your wp_config, use only “user” and not: “user_user”.
   Ok?
 *  Thread Starter [chenks](https://wordpress.org/support/users/chenks/)
 * (@chenks)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480684)
 * i host my own server… so i actually created the empty database and the user manually..
   so i know 100% that they are correct.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480685)
 * Are you running mySQL on a non-standard port or something?
 *  [willbisbee](https://wordpress.org/support/users/willbisbee/)
 * (@willbisbee)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480686)
 * I am also having the same problem. After configuring and uploading WordPress 
   files, running wp-config.php gives me the “Error establishing a database connection”
   page. Having just created the user name and password, I find it hard to believe
   that is the problem. I used an asterisk (*) in the password, but doubt that Unix(
   my Web hosting server) will have a problem with that (haven’t figured out how
   to change it anyway short of deleting the database and starting over from scratch).
   PHPMyAdmin indicates that the server name is sql2.bravehost.com, whereas my site
   is on [http://www.bravenet.com](http://www.bravenet.com) leading me to believe
   I need to set ‘DB_HOST’ to that sql server and not ‘localhost’ in my config file.
   Anyway, I tried the config file both ways; neither worked. Based on one of the
   earlier responses here from gaefke, is there a way to log onto that sql2.bravehost.
   com server and check the database name and password directly? PHPMyAdmin indicates
   the database server is up and running.
 *  [willbisbee](https://wordpress.org/support/users/willbisbee/)
 * (@willbisbee)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480688)
 * Okay, on the theory that perhaps I had used an illegal file name, username (perhaps
   too long) or password (the asterisk),
    I finally just deleted the MySQL database,
   created a new one with shorter file and user_name, an created a password with
   no asterisk(*) in it. Changed my wp-config.php file to reflect the new database,
   and it came right up. Problem solved. Consider me fixed.
 *  Thread Starter [chenks](https://wordpress.org/support/users/chenks/)
 * (@chenks)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480699)
 * no…. MySQL is running as standard… other websites connecting to other databases
   prove that MySQL is running correctly.
 *  Thread Starter [chenks](https://wordpress.org/support/users/chenks/)
 * (@chenks)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480733)
 * this is still not working for me.
 * what else could be causing the problem?
 * does WP work ok with mysql 5.0.27 and php 5.2.0?
 * i have tried getting WP to connect and use an existing database and username 
   that is alread working, and still it fails – so i am fairly sure it isn’t a database/
   user issue.
 *  [bradels](https://wordpress.org/support/users/bradels/)
 * (@bradels)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480768)
 * I had the same problem. I set the Password for the User I was using in the config
   file back to the “OLD” password type (see the attached link).
 * [http://wordpress.org/support/topic/58628](http://wordpress.org/support/topic/58628)

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

The topic ‘WP not seeing database’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 15 replies
 * 7 participants
 * Last reply from: [bradels](https://wordpress.org/support/users/bradels/)
 * Last activity: [19 years, 5 months ago](https://wordpress.org/support/topic/wp-not-seeing-database/#post-480768)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
