Site Url: olympia.rf.gd
Details of error:
A PHP Error was encountered
Message: mysqli::real_connect(): (HY000/2002): Connection timed out
Line Number: 201
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Line Number: 7
I have double-checked the following and ensured they are correct in the config file:
db name, db username, db password, db hostname and db driver
I am trying to set up a custom built CMS but I got that error. Please help.
Are you trying to connect the DB on another server?
Not really. The cPanel MySql page shows:
MySql DB name: epiz_24301552_cms
MySql hostname is sql210.epizy.com
but phpmyadmin says
MySql hostname: sql210.bycluster.com
In the config file, I decided to use the db hostname in phpmyadmin
Could this be the reason for the error? Will changing the db hostname fix the error?
sql210.epizy.com is the same as sql210.byetcluster.com
Please read the KB Article I sent above!!
I did read the above KB article in detail. It does not cover the nature of the error I have. I could send you my config.php and database.php code for you to review. I do not mind. I have double checked everything.
If you wrote the software yourself, you should use something like mysqli_error or mysqli_connect_error (if you’re using MySQLi) or mysql_error (if you’re using the outdated MySQL library). Using the PDO library should throw a PDOException which you can print for more information.
Please do the above, this will reveal the error.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.