• chenks

    (@chenks)


    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

    (@whooami)

    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

    (@chenks)

    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

    (@chenks)

    should also add… this is when i am trying to run wp-admin/install.php

    Thread Starter chenks

    (@chenks)

    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

    (@articles)

    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

    (@chenks)

    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

    (@gaefke)

    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

    (@gaefke)

    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

    (@chenks)

    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)

    (@otto42)

    www.ads-software.com Admin

    Are you running mySQL on a non-standard port or something?

    willbisbee

    (@willbisbee)

    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 https://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

    (@willbisbee)

    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

    (@chenks)

    no…. MySQL is running as standard… other websites connecting to other databases prove that MySQL is running correctly.

    Thread Starter chenks

    (@chenks)

    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

    (@bradels)

    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).

    https://www.ads-software.com/support/topic/58628

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘WP not seeing database’ is closed to new replies.