I am trying to create a script to check the status of a mysql server on one of my sites by going through the port 3306..
Here's the code I have so far..
$socket_connection = @fsockopen("whatever.com", 3306, $error_number, $error, 35);
#RETRIEVE CONNECTION RESPONSE
$connection_response = fgets($socket_connection, 4096);
My connections are fine after adding my source IP to the mysql's "whitelist".
I keep getting errors like:
s���ÿiHost 'host.blahblahblah.com' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
Do you guys know what is a successful response from a mysql connection?