Username (

(please specify the website or account you are as

-Failed To connect to MySQL-

I recently uploaded a dynamic PHP site, uploaded all my files and imported a database.
I used the db.php to insert username, password, server etc as required.
Problem is, the static aspect of the database is live but the backend remains off. It keeps showing “can’t connect to MySQL”.

I have about three PHP files for connection.
One is db.php, conn.php and connect.php
When I checked on YT, some tutors used db.php to define connection while others used the remaining.

I’m confused on what to do.


Can you share the code that you are using? Make sure to hide the password.

This article also has some troubleshooting tips:


thanks… it worked.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.