– First, try contacting the hosting provider if the database server is online / if they have any other problem at their end, or they made any changes to your account, or if there are any limitations/restrictions, if the hosting package is set to Windows and not Linux, etc .
– double check your wp-config.php file settings for the database name, database username and database password. This is where most errors occur.
-Then check that you don’t need to change the database host from “localhost” to something else. You can get that info from your hosting provider.
-Check you have actually created a database with the same database name as is in your wp-config.php file.
-Last, but not least, if all that information is correct your database probably has a problem with it, and you may need to contact your hosting provider.
I’m connecting to database correctly from the independent sql client and I’m able to created, insert, drop tables without any problems for the database I’m trying to use with user id and password I’m attempting to configure wordpress.
My EC2’s security group setting allows 3306 port and my netstat and iptables command confirm that I have the correct port and it is open.
Basically, only wordpress cannot connect to my database.
It has been two days since I’ve been stuck on this issue and this is driving me mad….
This is now resolved.
Issue was in this line.
Does the user testing have permission to use the DB_NAME database?
“DB_NAME” isn’t my database, and I noticed that DB_NAME isn’t set correct with custom database name when I tried to configure without manually configuring “wp-config.php”.
So I went back to manually configuring “wp-config.php”. But when I access “index.php” it redirect me to “wordpress/index.php/wp-admin/install.php”.
Which is obviously wrong. it needs to be “wordpress/wp-admin/install.php”.