将端口更改为8080后,testmysql.php无法在wamp服务器上运行

时间:2013-06-07 04:30:00

标签: wampserver

我刚刚在Windows 8上安装了wampserver而我无法使其工作,在阅读了一个更小的位后,我能够将其更改为80到8080的端口。 现在我正在尝试使用默认文件testmysql.php来测试它 像这样:

$link = mysql_connect('localhost:8080','silv','123');

但现在收到以下错误消息

Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: MySQL server has gone away in C:\wamp\www\testmysql.php on line 2

/

arning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Error while reading greeting packet. PID=4848 in C:\wamp\www\testmysql.php on line 2

/

Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: MySQL server has gone away in C:\wamp\www\testmysql.php on line 2

/

Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\testmysql.php on line 2

任何想法我可能做错了什么?它是主机的名称问题究竟是什么?

感谢,

1 个答案:

答案 0 :(得分:0)

默认情况下,MySQL服务器的端口号不是8080。在大多数情况下,默认情况下为3306或8889。您应该能够在WAMP服务器设置中看到这一点。