$conn = mysql_connect("localhost","mysql","");

localhost 换成 127.0.0.1 试试呢?