I am not able to connect to MYSQL, I getting the following error message,
Warning : mysqli::__construct(): (HY000/2002): Connection timed out in /home/vol7_1/epizy.com/epiz_26329463/htdocs/app/database.php on line 9
Connection failed: Connection timed out
Please let me know, how to get around this problem.
Hi,
Thanks for the reply, I did not connect to MYSQL from outside the Hosting Account nor from Any App. I have the PHP script uploaded to the free hosting account only, still I am not able to connect to MYSQL even if I open it in a web browser. There is some problem from the Server Hosting Side.
Sincerely,
Vimal
You forgot the ; after $database="database-name"- that just by mistake even after adding the ; after database name it is showing the same error. The site is 2 years old.
Please let me know if there is something wrong in using new mysqli in PHP 7
$connection = new mysqli($servername, $username, $password, $database);
Sincerely,
Vimal
Hi,
Nope, changed and checked with $dbname still getting the same error, I think there is some problem with the server side, because from the script side everything is correct and I am able to connect to MYSQL from a different hoster.
Sincerely,
Vimal
Please make sure your using the details found in the client area. @jaikrishna.t , I believe the variables can have whatever names you want, as long as they are in the correct order.