[This topic is migrated from our old forums. The original author name has been removed]
Hi,
I try to use DBVisualizer with our Informix database, but can't connect by leaving username/password empty.
As it's only a development db, connections from anywhere are allowed in /etc/hosts.equiv:
-root
-informix
+
My problem is that even I fill or not username/password in the connection alias, I receive an error:
"Incorrect password or user com.informix.asf.IfxASFRemoteException: [username]@local_hostname is not known on the database server."
The @loacal_hostname is added by the jdbc driver.
I tried to connect from code using the JDBC driver in different ways to figure out how to set the connection URL properly:
String url = "jdbc:informix-sqli://[dbserver]:[dbport]/sysmaster:INFORMIXSERVER=[dbalias]";
1.: conn = DriverManager.getConnection(url); //Connection is OK
2.: conn = DriverManager.getConnection(url,null,null) //Connection is OK
3.: conn = DriverManager.getConnection(url,"","") //Error: @local_hostname is not known on the database server.
4.: conn = DriverManager.getConnection(url,"myuser","secret") //Error myuser@local_hostname is not known on the database server.
So if I give nulls as username/password the connection is OK, but otherwise it fails. I've heard that the username from system properties is used if it's left empty (??) but it's actually "myuser" in my case... I assume if I leave username/password empty in DBVisualizer it tries to connect this way: DriverManager.getConnection(url,"","") which drops the mentioned exception.
I'm using Informix JDBC 3.70, server version is 10.00.
I've found a thread about a similar problem, but no resolution: http://www.dbvis.com/forum/thread.jspa?messageID=6739
Can you please advice?
Is there anything I should set in the connection url or driver properties to get it working? Is there anybody using Informix with similar (non)security settings?
Thanks,
Balazs
Re: Informix trusted connection - without credentials
Hi Balazs,
Your analysis is connect and even if you do not specify a username and password, DbVisualizer is trying to connect with empty strings for these properties.
This behavior was added years ago due to other problems, but we will look into if those issues have been resolved some other way so that we can now connect without specifying a username and password if they are blank.
Best Regards,
Hans
Edited by: Hans Bergsten on Dec 21, 2012 1:46 AM
a
anonymous
said
almost 12 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Informix trusted connection - without credentials
Hi,
Thanks for the feedback.
Is there an older version of DbVisualizer maybe that I should try?
Regards,
Balazs
Hans Bergsten
said
almost 12 years ago
[This reply is migrated from our old forums.]
Re: Informix trusted connection - without credentials
Hi Balazs,
It looks like it may work with 5.1.1, but it's so old that I don't recommend you to try it. Hopefully we can get fixed soon in 9.x instead.
Best Regards,
Hans
a
anonymous
said
almost 12 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Informix trusted connection - without credentials
Hi Hans,
Ok. I'll check back for updates regularly.
Thanks,
Balazs
Hans Bergsten
said
almost 12 years ago
[This reply is migrated from our old forums.]
Re: Informix trusted connection - without credentials
Hi Balazs,
In the next maintenance release, you will be able to specify that the Userid and Password should be passed as null (or actually, not passed at all) by setting these to the Null String value specified in Tool Properties under Data Formats, by default "(null)".
The reason we cannot pass null for an empty value is that some users actually have defined users with empty string as the password (this is why we changed the behavior earlier).
Best Regards,
Hans
a
anonymous
said
almost 12 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Informix trusted connection - without credentials
Hi Hans,
Sounds great, thanks! Actually I tried "(null)" before hoping for exactly this kind of functionality...
I will have a look at it when the release is out and get back to you.
Regards,
Balazs
Roger Bjärevall
said
almost 12 years ago
[This reply is migrated from our old forums.]
Re: Informix trusted connection - without credentials
Balazs,
Just to inform you that (null) can now be specified in the Userid and Password fields.
Regards
Roger
a
anonymous
said
almost 12 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Informix trusted connection - without credentials
Hi Roger,
I tried the new release and it works just as expected. Great thanks for the fix!
Regards,
Balazs
anonymous