Hi All,
I hope someone can help with this connection problem.

We have MySQL 4.0.12 installed on a W2K server and we are using the Connector/J version 3.0.7 driver to connect our Java applet to the database. The applet and the database are both on the same machine. mysql-connector-java-3.0.7-stable-bin.jar is in Java\j2re1.4.1_01\lib\ext

The applet starts and makes the connection to the mysql database when running on localhost and everything works OK.

Using a PC on the intranet or internet the applet starts but fails to make the database connection.

The root user has been granted:
grant all on dbname.* to [EMAIL PROTECTED] identified by 'password';
grant all on dbname.* to [EMAIL PROTECTED] identified by 'password';
and another user
GRANT ALL ON dbname.* TO [EMAIL PROTECTED] IDENTIFIED BY 'userpassword';
but neither can connect to the database over the network.

The user and root can access the database using
mysql -u username (or root) -p
and then entering the password.

When attempting to connect from the PC on the intranet the trace gives the following:

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at sun.applet.AppletClassLoader.findClass(Unknown Source) at sun.plugin.security.PluginClassLoader.findClass(Unknown
Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at Database.connect(Database.java:666) at Database.testExists(Database.java:305)
<snip>


Attempting to connect over the internet the trace gives:

java.sql.SQLException: Unable to connect to any hosts due to exception: java.security.AccessControlException: access denied (java.net.SocketPermission 192.168.1.90:3306 connect,resolve) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1592) at com.mysql.jdbc.Connection.<init>(Connection.java:486) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:326) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at Database.connect(Database.java:667)
<snip>


Thanks in advance for any help on solving this problem.

John Langan



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to