com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

http://netbeans-org.1045718.n5.nabble.com/com-mysql-jdbc-exceptions-jdbc4-CommunicationsException-Communications-link-failure-td2950072.html

It sounds like MySQL server isn't running.

If you are using Windows, make sure mysqld -nt.exe is running. You can use Task Manager to see if the service is running and Control Panel's Administrative Tools|Services dialog to start the service if it is not. On my computer the service name is MySQL .

janpihlgren wrote:
Just installed NetBeans 6.5 and now try to run som javaprogram that require connection to a MySQL -database.
I get this errormessage:
com .mysql .jdbc .exceptions .jdbc4 .CommunicationsException : Communications link failure
and a point to these rows int the program:
        String _url = "jdbc :mysql ://localhost:3306/" +database;
        Connection conn = DriverManager.getConnection(_url, user, pwd);

posted @ 2010-10-27 21:47  qiang.xu  阅读(12225)  评论(0编辑  收藏  举报