Getting Error establishing a database connection
-
I have an Ubuntu Server 16.04.5 vm on virtualbox 5.2.20. After following the guide here on installing wordpress I get the error below after running http://192.168.93.105/wp-admin/setup-config.php in my browser:
Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file to your WordPress installation.
So, I then changed the name of the wp-config.php file back to wp-config-sample.php. I then refreshed my browser and it works! WRONG!
I select my language, read the information and click ‘Let’s go!’…everything works so far. I then put in the db name, username, password and host in the browser. When I click Submit I get the below 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 192.168.93.105. 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.There were one thing I noticed. It looks like it is NOW looking for a wp-config.php file. I’m not understanding why at first it wanted the -sampl.php file and afterwards wants the config.php file.
I also tried keeping both wp-config.php and wp-config-sample.php file and I’m just running into issues.
Can someone point me in the right direction?
The topic ‘Getting Error establishing a database connection’ is closed to new replies.