I have a database I created in mySQL. I've been entering data every day
into the database using a Java application that I wrote. The database
and the Java program are on the same Win 98 SE machine.
I've been working on another program (an applet) to send and receive
data over the internet. I got the applet to connect with the database
and receive data. All the while I was developing the applet, I would
tell it to find the database at 127.0.0.1 if I wasn't connected to the
internet, or I'd give it the current IP address of my connection if I
was. This seemed to work fine all along.
Now that the program is nearing completion, I uploaded a copy of it to
my personal web space to give it a "real-life" try.
http://dslextreme.com/users/ffej2ffej/SQL4/sql4.html
Unfortunately, now I cannot connect to the database. When I try, it
throws an SQLException. The SQLException.toString() returns:
java.sql.SQLException: Unable to connect to any hosts due to exception:
java.security.AccessControlException: access denied
(java.net.SocketPermission 66.159.205.204:3306 connect, resolve)
Does this mean that Windows on my machine is preventing access to the
database? Does it mean the Java applet isn't looking in the right
place? Is there something else wrong? Please let me know. I'd be
happy to upload the entire applet source code or anything else if necessary.
Also, I think it's important that I mention that the database is not
operational all the time. It will be someday, but right now I just
start it when I need it. Even if it was, I'm using the only phone line
in this house to get online so it's always for a short time.
Jeff Sandler