We recently updated PHP to the latest version, and we had a PHP script that was running that is now broken.
Currently, it is not even allowing me to connect to the SQL database at all, and is returning this error:
Failed to connect to MySQL: Can't connect to MySQL server on mysql01.fau.edu (13) 2003
The database itself is located in a Linux environment and I currently cannot get even a simple script as the one below running:
$host = 'mysql01.fau.edu';
$username = '*****';
$password = '*****';
$database = '******';
$connect = mysqli_connect($host,$username,$password,$database);
if (mysqli_connect_errno()) {
echo 'Failed to connect to MySQL: ' . mysqli_connect_error() . mysqli_connect_errno();
} else {
echo 'Connected to MySQL! </ br>';
}
For security purposes Mysql is not remotely accessible by default, unless you whitelist the allowed IP in the backend.
You have mentioned it used to work on your laptop which could very possibly change IP.
Use the same network when it was working
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With