• Resolved omniscient3

    (@omniscient3)


    Hello,

    I am setting up my first wordpress site and have run into a problem at step 5 in the famous 5 minute install. Here are some bulleted points on my setup

    -I am hosting my own web server
    -I am using IIS 7, which is fully configured and working
    -I have installed the latest version of PHP which is fully configured and working
    -I have installed the latest version of MySQL and have created a new database named “wpdb” and a new user named “wpadmin” with full permissions to the database.
    -I have been able to log into the wbdb database with wpadmin account
    -I have quadruple checked that the user name and password in the wp-config.php are correct
    -The hostname of the server I am using is “localhost”.
    -The MySQL service is started, which I assume means the database instance is running

    The is the error I receive when I try to load the install.php site is:

    “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 localhost. This could mean your host’s database server is down.

    •Are you sure you have the correct username and password?
    •Are you sure that you have typed the correct hostname?
    •Are you sure that the database server is running?
    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.”

    I have run out of ideas to try and I am now looking for some help. The only thing I’m not so sure of is if the database instance is actually running. The service is started, but I don’t see any system tray icon or anything indicating that it is actally running. If anyone here is familiar with MySQL and could clarify on that, it would be a great help.

    I apologize in advance if this issue has already been solved in a another post. I took a quick look, but could not find anything related.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter omniscient3

    (@omniscient3)

    I was able to resolve this issue after several hours of scratching my head. I changed the “localhost” setting in the wp-config.php file to 127.0.0.1 and it starting working right away.

    This issue is now resolved.

    I’m getting the same error, but trying to use WebHostingPad.

    http://support.webhostingpad.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=36

    didn’t seem to help.

    I’ve tried mydomain.com, http://mydomain.com, localhost, the FTP hosting IP address I got from WebHostingPad when I registered, 127.0.0.1 just to give myself some time to think, and probably a couple others I forgot. I’ve tried moving the install around as well. I’ve checked the user and dbname over and over, too.

    I even tried using both WordPad and Notepad, saving it as UTF8.

    The hostname I type in always shows up on the error page.

    I looked, too, and couldn’t find any good posts here related, either. I am stumped.

    Here’s what I have (the domain is futuregramma.net, the user is just ‘dev’, and I’ve substituted the password):
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘futuregr_wp’);

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

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

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

    /** 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’, ”);

    Thanks ahead of time.

    I upgraded my WP to 3.0 beta 2 and I experienced the same error. After wasting the whole afternoon, I found this posted and just to give it a shot, changed ‘localhost’ to ‘127.0.0.1’ in wp-config.php. Wola, everything works again.

    A ‘localhost’ entry is in my /etc/hosts file. Pinging localhosts also works. I really don’t know what caused the error in WordPress.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.