【问题标题】:Unable to connect to XAMPP MySQL from Netbeans无法从 Netbeans 连接到 XAMPP MySQL
【发布时间】: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 驱动程序。

【问题讨论】:

    标签: mysql netbeans xampp


    【解决方案1】:

    对我有用的修复方法如下:

    请查看 netbeans 是您的防火墙和防病毒软件中允许的程序

    检查:

    如果 netbeans 启动页面显示“无法连接到 Internet”,那么您必须更改防火墙和/或防病毒设置以允许它

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-22
      • 2019-05-10
      • 2014-01-13
      • 2021-10-27
      • 2022-09-24
      • 1970-01-01
      • 2021-04-18
      • 1970-01-01
      相关资源
      最近更新 更多