Hi. I am trying to connect my
applet to a mysql server in my computer. But I have a problem.
Let me expand my problem:
here is my simple
java code:
I executed this file in a different directory from www(localhost)so I used a java policy file including text below.
The output I get is:
Driver loaded.
Error: java.sql.SQLException: Cannot connect to MySQL server on localhost:3306. Is there a MySQL server running on the machine/port you are trying to connect to? (java.lang.NumberFormatException)
java.sql.SQLException: Cannot connect to MySQL server on localhost:3306. Is there a MySQL server running on the machine/port you are trying to connect to? (java.lang.NumberFormatException)
at com.mysql.jdbc.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.jdbc2.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at DbConnectorForNet.ConnectDB(DbConnectorForNet.java:52)
at DbConnectorForNet.main(DbConnectorForNet.java:67)
Then I tested my mysql server with a php script, it works. After that I checked mysql config for skip-networking and i edited it like this:
; skip-networking
I am really in stack and I have no more idea why it does not work. I appreciate any useful idea, thanks in advance.
cheers
[ July 13, 2006: Message edited by: erdem ozdemir ]