Support » Localhost Installs » Error establishing a database connection

  • I’ve installed hundreds of WordPress or other programs that utilize mySQL. This is a new installation of a Windows WAMP server and WP 4.2. I set up the database, started WP install and on second page where you enter the database credentials, I click “Submit” and get this error:

    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’m sure I entered the correct credentials. I’ve checked a dozen times. Funny thing, it says the wp-config.php file might be wrong but there is no wp-config.php file and I was under the impression that the installation created this file. If I make a wp-config.php file and enter the database values as I’ve seen suggested elsewhere, the install fails because the file already exists and it wants me to delete it. Crazy, I don’t know what is wrong. As I said, I’ve installed WP for years. Any ideas?

Viewing 1 replies (of 1 total)
  • mysql may not be configured to listen on the IP/URL you entered into your setup screen, is this a new server/hosting setup, or do you have other sites here you could copy the wp-config.php file from and modify with your database name and credentials?

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