chglove Posted July 11, 2012 Posted July 11, 2012 i got an error when using mysql_connect() function, this is my code and error info: <?php $conn = mysql_connect('118.114.134.59:3307', 'test', '123456'); if (!$conn) echo mysql_error(); else echo "OK!"; ?> Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '118.114.134.59' (4) in /home1/chglove/public_html/test.php on line 2Can't connect to MySQL server on '118.114.134.59' (4) but if i change the server port to 3306, mysql_connect('118.114.134.59', 'test', '123456'); it worked, and i can connect to my server use port 3307 from other sites, what's the problem? you can use http://blog.chglove.tk/test.php to see this error
Recommended Posts