Java app可以从mysql中检索数据

时间:2012-10-03 11:52:57

标签: java eclipse apache easyphp

一个奇怪的问题 我使用eclipse在java中创建了一个应用程序,其中数据从数据库中检索,但在第二行它停止响应,并且localhost服务器也停止响应......

Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://127.0.0.1:8080/testdb/", "root","");

通过调试我注意到eclipse称之为exe

c:\program files\java\jre7\bin\javaw.exe

但它没有回应 apache服务器启动但没有响应。
并生成此错误文件
Apache error.log

Command line: 'C:\\PROGRA~1\\EASYPH~1.1\\Apache\\bin\\apache.exe -d C:/Program Files/EasyPHP-12.1/apache'
[Wed Oct 03 16:27:03.579034 2012] [mpm_winnt:notice] [pid 6776:tid 464] AH00418: Parent: Created child process 5576
[Wed Oct 03 16:27:04.392034 2012] [mpm_winnt:notice] [pid 5576:tid 472] AH00354: Child: Starting 64 worker threads.
[Wed Oct 03 16:27:08.094034 2012] [mpm_winnt:notice] [pid 7088:tid 476] AH00364: Child: All worker threads have exited.
[Wed Oct 03 16:52:36.275034 2012] [mpm_winnt:warn] [pid 5576:tid 700] (OS 64)The specified network name is no longer available.  : AH00341: winnt_accept: Asynchronous AcceptEx failed

1 个答案:

答案 0 :(得分:2)

我会检查MySQL是否正在侦听端口8080.默认值是3306.你是否设置了MySQL守护进程来侦听端口8080?