This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 162236

Summary: can't connect to MySQL server using NetBeans 6.1, 6.5, 6.5.1 on ArchLinux i686, JDK 1.6.0_12-b04
Product: db Reporter: thea <thea>
Component: MySQLAssignee: Jiri Rechtacek <jrechtacek>
Status: RESOLVED WORKSFORME    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: This is the error in windows vista. It says exactly the same in xp
I used the options you said
Maybe this is the correct log.

Description thea 2009-04-08 16:05:55 UTC
**This issue appears to be similar to, or the same as, issue 161549 (different Linux dist.)

I know this is not a new topic, but nothing I have read in previous posts (or anywhere else, for that matter) shed any
light on why I (and others I know) can't connect to the MySQL server using Netbeans 6*.

I am running ArchLinux, the server can be started and stopped at:
/etc/rc.d/mysqld

The mysql executable is where it should be: /usr/bin/mysql.

Absolutely no problems using any other client connection, at:
localhost
port 3306
user: admin
pwd: ****

skip-networking in my.cnf has been commented out.

I've read the tutorial. The routine for registering a MySQL server in NetBeans will not work and is obviously faulty (if
I start the server independently, the Start option in the menu is not greyed out. Likewise, if the server has not been
started independently, and I try to start it using the registration dialogue -- which of course does not work --
nevertheless the Start option will be greyed out, as if the server was running (which it is not, as an independent check
demonstrates). It seems to me to be more than obvious that there is some problem with NetBeans, but what? and can it be
fixed somehow?

Just for the sake of completeness, although again nothing new, the error message that is consistently given is:

-- 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

-- Last packet sent to the server was 0ms ago..

Any help is appreciated. Just to repeat, my MySQL settings are correct, they worked for NetBeans 5*, I've done my
research and have not found anything useful.
Comment 1 Jiri Rechtacek 2009-04-17 08:54:59 UTC
I'm evaluating this problem...
Comment 2 ouribeb930 2009-04-19 23:04:24 UTC
It also fails for windows vista and xp
I have been working in an application and I backup the db for use in my house, I instaled mysql 5.1 with all the tools 
and I cant connect to the server. Please refer to the image.
Comment 3 ouribeb930 2009-04-19 23:06:54 UTC
Created attachment 80460 [details]
This is the error in windows vista. It says exactly the same in xp
Comment 4 ouribeb930 2009-04-20 13:20:26 UTC
Sorry, I miss to tell you that I can connect via mysql tools and from and the mysql odbc driver. 
When I add the mysql driver, and I open the combobox, the mysql driver name appears four times, and I installed only
one. Maybe this help you.
Thanks
Comment 5 Jiri Rechtacek 2009-04-20 14:08:41 UTC
It seems as a problem with proxy server while creating a network socket. Could you run your IDE with verbose logging.
i.e. run IDE with command options: -J-Dorg.netbeans.core.NbProxySelector.level=-1
-J-Dorg.netbeans.core.ProxySettings.level=-1 and then send your messages.log back? Thanks
Comment 6 ouribeb930 2009-04-20 22:49:14 UTC
Here is the log, hope this is what you asked for...
Thanks for the fast reply...
Comment 7 ouribeb930 2009-04-20 22:50:37 UTC
Created attachment 80548 [details]
I used the options you said
Comment 8 ouribeb930 2009-04-20 22:54:28 UTC
Created attachment 80549 [details]
Maybe this is the correct log.
Comment 9 nightwalker_s 2009-04-21 10:29:56 UTC
I have exactly same issue on Pardus Linux with Netbeans 6.5.1 and Mysql 5.0.51b . I started netbeans with 
-J-Dorg.netbeans.core.NbProxySelector.level=-1 -J-Dorg.netbeans.core.ProxySettings.level=-1 options but I can't find
where message.log file is.

Is there any thing new about this issue ? 
Comment 10 Jiri Rechtacek 2009-04-23 15:30:48 UTC
To nightwalker_s: the messages.log is placed in your home directory, like C:/Users/<account_name>/.netbeans/<NetBeans
version>/var/log/messages.log 
Comment 11 dfanie 2009-05-18 12:58:03 UTC
I have this problem in Vista and in XP. Can connect to database with Gui Tools. Can connect to database through my 
code, but if I want to use Hibernate or just connect via the Services tab in Netbeans 6.5

Has there been any feedback on this issue yet jrechtacek??
Comment 12 Jiri Rechtacek 2009-07-01 07:44:02 UTC
NB6.7 was released already - http://www.netbeans.org/community/releases/67/
Postpone fixing this issue on the next release.
Comment 13 JustB 2010-01-26 10:21:31 UTC
I solved this issue by adding
-----------
mysqld: ALL
----------
to /etc/hosts.allow

and by commenting the variable 
---------------
Skip-Networking
----------------
in /etc/mysql/my.cnf
Comment 14 Jiri Rechtacek 2010-11-05 18:48:57 UTC
Is it still a valid problem in NB7.0M2?
Comment 15 chainsaw 2011-01-07 19:53:06 UTC
I also can't connect to the MySQL server, using NetBeans with PCLinuxOS and Netbeans 7.0 beta.

The MySQL server is running and other software and drivers are able to connect to the MySQL server such as MySQL Administrator but the Netbeans connection wizard just reports.

"cannot establish a connection to jdbc:mysql://localhost:3306/mysql using com.mysql.jdbc.Driver (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.)"
Comment 16 chainsaw 2011-01-07 20:21:43 UTC
Resolved this by editing the MySQL startup parameters file and commenting out "skip-networking".

---------------
skip-networking
----------------
in /etc/my.cnf

changed to:
#skip-networking