Warning: mysqli_connect(): (HY000/2002): Connection refused in /home/vol1_3/epizy.com/epiz_31039179/htdocs/xxx.php on line 57
Warning: mysqli_error() expects parameter 1 to be mysqli, bool given in /home/vol1_3/epizy.com/epiz_31039179/htdocs/xxx.php on line 58
Other Information
I’ve seen this error message several times (maybe…over a month?) and switched the accounts for it.
Here are imformations:
Before I change account:
Username: epiz_29904250;
MySQL Hostname: sql212.epizy.com. After I change account:
Username: epiz_31039179;
MySQL Hostname: sql211.epizy.com.
Line 57,58 on xxx.php:
57: $connect = mysqli_connect($dbhost, $dbuser, $dbpass);
58: if(!$connect){die('Died: ’ . mysqli_error($connect));}
By the way,I’m not a native English speaker, so excuse me if I make grammatical mistakes.( ̄ε(# ̄)
No, when connecting to the database you need to state all variables at once. You may be able to connect to other databases using the code you have, but in order to connected to InfinityFree’s databases, you need to use all 4 in the mysqli_connect() command.
How often does this happen? A few times per month doesn’t sound so bad.
There are various reasons why this can occur. Maybe the database server is congested, maybe maintenance is being performed, maybe you’re running into a limit.
Please note that we can’t and don’t promise perfect uptime on free hosting.