I have a website and users in it, now when they login, they get this "Unable to Connect to Msql" error. this also happens when i login to th admin dashboard.
I checked the db connections in the wp-config file and its ok. i also did a db test file to check whether i can connect to the host and DB respectively, and all was succesfull.

Please can any one know what the problem might be.

3 Years
Discussion Span
Last Post by Gideon_1

@Stephano, from what you are saying it means that every thing is okay with the database connection. If so, then can you check your logic well. Sometimes it happens when dealing with especially logical operators.

Votes + Comments
hows that done

@Stephano, the logic I'm referring to here is not anything special than your conditions specified in the if and switch statements.

For instance,

Normally, you will say if (username_is_unique && password_is_correct) then login or else do something else (which is usually the error message). So, provided that your database connection is correct and also there is no fault with your sql then check those conditions.

I hope it helped.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.