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.

Recommended Answers

All 3 Replies

code please..

@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.

commented: hows that done +0

@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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.