HI;
I have MySQL running on a mandrake Linux box. I installed MySQL
Query Browser client. I added a user to my MySQL called zico. I was
able to connect from MySQL Query Browser to the database and run a
query. When I try to connnect to the database using "java ExecuteSQL -d
org.gjt.mm.mysql.Driver -p elf -u zico jdbc:mysql://192.168.2.3/test",
it doesn't work. Does jdbc (Connector J)has a verbose debugging
options? my /etc/my.cnf file is empty and mysqld didn't start with the
skip-networking option. I can see everything fine with MySql Query
Browser. How come this is not working? Thanks for any help.
STACKTRACE:
java.net.SocketException: java.net.ConnectException: Connection
refused: connect
at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
va:151)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1774)
at com.mysql.jdbc.Connection.<init>(Connection.java:437)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:268)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at ExecuteSQL.main(ExecuteSQL.java:47)
** END NESTED EXCEPTION **
What happens if you try to telnet to 192.168.2.3 port 3306? If it
connects, then there's something going on with the JDBC driver. My guess
is that it _won't_ connect and your database server isn't listening to
TCP/IP on that port, or it's firewalled somehow.
-Mark
--
Mark Matthews
MySQL AB, Software Development Manager - Connectivity
www.mysql.com
Thanks for the info. The connection is there but jbdc is not working.
Hany
Thanks.