2013-07-29 129 views
1

我是一個Windows 7用戶,我遇到了MySQL和XAMPP的問題。無法連接到Netbeans的XAMPP MySQL

我使用XAMPP附帶的MySQL。我已經使用XAMPP的安全頁面更改了MySQL的root密碼。然後我嘗試通過Netbeans連接到MySQL服務器。

嘗試連接我點擊刪除數據庫中的服務面板的上下MySQL服務器選項,我給它一些設置:

server host name:localhost 
username:root 
port:3306 
password:(my sql password) 
path to admin module:(http:'//')localhost/phpmyadmin 
sql start path:D:\D-drive\xampp-portable\mysql\bin\mysqld.exe(also tried mysql_start.bat) 
sql stop path:</b>D:\D-drive\xampp-portable\mysql\bin\mysqladmin.exe(also tried sql_stop.bat) 

然後,我右鍵單擊MySQL服務器在本地主機[根]和選擇連接,這是當我得到一個錯誤:

Unable to connect to the MySQL server: 
org.netbeans.api.db.explorer.DatabaseException: org.netbeans.api.db.explorer.DatabaseException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.. 
The server may not be running or your MySQL connection properties may not be set correctly. Do you want to edit your MySQL connection properties? 

更改localhost爲127.0.0.1也不起作用。我也有jdbc驅動程序。

回答

2

爲我工作的解決方法是如下:

請看到,NetBeans是在防火牆的允許程序以及殺毒軟件

檢查:

如果netbeans啓動頁面顯示「無法連接到互聯網」,那麼您必須更改您的防火牆和/或防病毒設置,以允許它