【发布时间】:2013-07-29 14:00:39
【问题描述】:
我是 Windows 7 用户,我在使用 MySQL 和 XAMPP 时遇到问题。
我使用 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)
然后我在 localhost [root] 上右键单击 MySQL 服务器并选择 Connect,这是我收到错误的时候:
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 驱动程序。
【问题讨论】: