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 161549 - Problems to connect to MySQL with Netbeans 6.1 in Mandriva 2009 Linux
Summary: Problems to connect to MySQL with Netbeans 6.1 in Mandriva 2009 Linux
Status: RESOLVED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P1 blocker with 1 vote (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-31 07:14 UTC by iawbjava
Modified: 2009-10-07 10:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description iawbjava 2009-03-31 07:14:20 UTC
Hi, I knew this is not a new problem. But I have goggled now for several days and also searched here
in this forum - but nothing helped me with my problem. Therefore here now my posting:

I run Netbeans 6.1 with Linux Mandriva 2009. The JDK is java-1.6.0-openjdk. The MySQL server is running 
(mysqld is active in the services and the tool "MySQL Administrator" also shows a running instance and I
am able to create databases and edit tables outside from Netbeans).

When I try to connect within Netbeans at the service tab (right click to MySQL Server, choose Connect)
I get the error message:

"Unable to connect to MySQL server. Please check your settings in the Properties and try again. 
Unable to communicate with the MySQL server. Please check to see that it is running and that your host
and port are set correctly."

The admin properties I have set to:

Path/URL to admin tool: /usr/share/applications/mysql-administrator.desktop 
(==> the file to start the MySQL Administrator - it works if I select "Run Administrator Too" from the 
not connected MySQL Server Item at the Service-tab)

Path to start command: /etc/rc.d/init.d/mysqld
Arguments: No arguments

Path to stop command: /usr/bin/mysqladmin
Arguments; -u root stop

Netbeans 6.1 is running with "run as another user" as an root application. But I also get the error message
from above also if I start the program in the normal modus. 

I have read already about to set the 127.0.0.1 (locaL host IP-adress) instead of the mane 'localhost' but
it does not not help. 
Also I have read already about to alter the my.cnf and to disable the skip-networking item but it does not help

Does someone has an idea and can help me? Meanwhile I really run mad with this
(Sorry but I have no clue what Subcomponent to set so I just choose code)
Comment 1 Jiri Prox 2009-04-01 08:56:00 UTC
What vaules did you enter as Server Port Number, Administrator User Name and  Administrator Password in the Basic
Properties?
Comment 2 iawbjava 2009-04-01 09:31:10 UTC
Hello, 
here the information you ask for
Server Port: 3306
Admin User: root
Password: The one I used with the installation of MySQL
Let me point out this again: With the "MySQL Administrator" I can reach the MySQL server. This tool uses the same values
to connect to th server like I described above.
Looking forward to any solution ;-))
Comment 3 ronatkins 2009-06-26 22:10:26 UTC
Try adding:

ALL: ALL@127.0.0.1 : ALLOW

...to your hosts.allow file (I'm on Ubuntu 9.04). This cleared up my problem (though, I welcome any thoughts on
undesired security ramifications). One other item, I read a post somewhere that having your machine name identified with
127.0.0.1 confuses some programs (not validated), Ex: If the hostname is 'Nomad', don't have this in your 'hosts' file:

127.0.0.1  localhost.localdomain localhost Nomad
Comment 4 ronatkins 2009-06-30 02:26:16 UTC
I spent a some more time with this issue (from a Linux angle). It seems that If you compile MySQL with the option
--with-libwrap, for tcp wrappers, you will (also) be required to grant access to users inside your 'hosts.allow' file
(yes, for EACH/ALL computers accessing your MySql Server). Examples of 'host.allow' directives include:

     mysqld: ALL@127.0.0.1 : ALLOW                # <or...>
     ALL: ALL@127.0.0.1 : ALLOW                   # <or...>
     mysqld: ALL@<your IP address here> : ALLOW

... an aside, #1: if you experience long delays in your initial handshaking, when logging in from a remote computer,
check that your remote computer's firewall(and/or router) allows IDENT (port 113) from the server. Failure can result in
wait times of several minutes [security issues not addressed here].

Second... Ubuntu now (8.04+) ships with AppArmor and an AppArmor profile for Mysql. Several other Linux distributions do
the same. If you continue to experience issues with your MySql connection, take a look in that direction.
Comment 5 martinhavle 2009-08-26 12:58:57 UTC
Please, try new version of IDE (http://www.netbeans.org/downloads/index.html). I am not able to test it on Mandriva, but
I have no issues on Ubuntu 9.04 with the latest version of IDE.
Comment 6 Antonin Nebuzelsky 2009-10-07 10:51:05 UTC
Closing without more info as worksforme.