Cannot Connect to Database
-
I am having trouble installing wp on my website. I have set up the mysql database, and have changed my config file, but I keep getting thefollowing error message:
<i>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 DB_HOST.
* 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?</i>I double checked my setting in the config file, and they are correct. Then I ran the following script to see if it was a database problem, as referenced in a previous thread.
<?php
$link = mysql_connect(‘localhost’, ‘mysql_user’, ‘mysql_password’);
if (!$link) {
die(‘Could not connect: ‘ . mysql_error());
}
echo ‘Connected successfully’;
mysql_close($link);
?>I was able to connect to the database with no problem — I got the message “connected successfully”. Then I triple checked to make sure I had the same configuration parameters in both files, and I did.
So why can’t I install?
the revelevant URL is https://je.operaglasses.org
- The topic ‘Cannot Connect to Database’ is closed to new replies.