Database Error

Site Url:

Details of error:

A PHP Error was encountered

Severity: Warning
Message: mysqli::real_connect(): (HY000/2002): Connection timed out
Filename: mysqli/mysqli_driver.php
Line Number: 201
File: /home/vol6_5/
Line: 7
Function: __construct
File: /home/vol6_5/
Line: 315
Function: require_once

A Database Error Occurred

Unable to connect to your database server using the provided settings.
Filename: controllers/Home.php
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?

Please read this:

1 Like

Not really. The cPanel MySql page shows:
MySql DB name: epiz_24301552_cms
MySql hostname is

but phpmyadmin says

MySql hostname:

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? is the same as

Please read the KB Article I sent above!!

1 Like

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.

1 Like


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