i will connect to mysql witout mysql_connect but have an error :)
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,'http://example.com:3306');
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
$fields = "user=root&pass=";
curl_setopt($curl_handle,CURLOPT_POST, count($fields));
curl_setopt($curl_handle,CURLOPT_POSTFIELDS, $fields);
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
if (empty($buffer)){
print "Nothing returned from url.<p>";
}
else{
print $buffer;
}
has error like
5.5.27)500>)P7cÿ÷€n|I3cxQnVC,Omysql_native_password!ÿ„#08S01Got packets out of order