Randomly database unable to connect

Regarding usernames, epiz_ usernames are common with old accounts (when epizy.com was still available as a domain option). New accounts usually start with if0_, just like in this case.

This also isn’t an issue here, while usually a common mistake, in this code = is meant to be used, as the value of mysqli_connect is assigned to the variable $con, the value of which is then checked (if !$con).

@Danyal_Assi: if you’re still facing an issue, try printing the connection error alongside the “failed to connect” message:
https://www.php.net/manual/en/mysqli.connect-error.php

This might also help:

The advice shared here may also help:

Replace 305 with your actual hostname (the xxx in the format sqlxxx.infinityfree.com).

4 Likes