472,992 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,992 software developers and data experts.

cannot connect to mySQL database using an applet

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

Jul 19 '05 #1
6 4082
"Jeff Sandler" <ff*******@dslextreme.com> wrote in message
news:10*************@corp.supernews.com...
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


An Applet can only connect to the host it is running on unless it is signed.
Hence the security exception.
Jul 19 '05 #2
"Jeff Sandler" <ff*******@dslextreme.com> wrote in message
news:10*************@corp.supernews.com...
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


An Applet can only connect to the host it is running on unless it is signed.
Hence the security exception.
Jul 19 '05 #3
"Jeff Sandler" <ff*******@dslextreme.com> wrote in message
news:10*************@corp.supernews.com...
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


An Applet can only connect to the host it is running on unless it is signed.
Hence the security exception.
Jul 19 '05 #4
Ryan,
Thank you for your quick response. Please tell me how I can make my
applet signed or where I can find out what this means.

Ryan Stewart wrote:
"Jeff Sandler" <ff*******@dslextreme.com> wrote in message
news:10*************@corp.supernews.com...
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

An Applet can only connect to the host it is running on unless it is signed.
Hence the security exception.


Jul 19 '05 #5
Ryan,
Thank you for your quick response. Please tell me how I can make my
applet signed or where I can find out what this means.

Ryan Stewart wrote:
"Jeff Sandler" <ff*******@dslextreme.com> wrote in message
news:10*************@corp.supernews.com...
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

An Applet can only connect to the host it is running on unless it is signed.
Hence the security exception.


Jul 19 '05 #6
Ryan,
Thank you for your quick response. Please tell me how I can make my
applet signed or where I can find out what this means.

Ryan Stewart wrote:
"Jeff Sandler" <ff*******@dslextreme.com> wrote in message
news:10*************@corp.supernews.com...
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

An Applet can only connect to the host it is running on unless it is signed.
Hence the security exception.


Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Krista | last post by:
Hi, I hope you guys can help me out~~~ when I run it localhost/config.php, it cannot display any message such as connect successfully or failed. Do u guys have any idea? config.php <html>...
20
by: Mr Dygi | last post by:
Hi, PHP 4.3.4 installed manually from package *.zip and Apache 2. I have a problem with this simple code: <?php $link = mysql_connect("127.0.0.1","","") or die("Could not connect: " ....
5
by: apchar | last post by:
I am trying to use php as a kind of servlet to act as a middle man between a java applet and mysql. I know java has jdbc but it's flakey and painful. php access to mysql is much nicer. So I have:...
4
by: bettina | last post by:
Hello, My domain: www.coaster.ch My database: coasters User: bettina In the programm I wrote: <?php $db_server = "www.coaster.ch";
0
by: bunnytail | last post by:
Hi All, I am making a Java Applet connects to mysql database, it works well in application mode. When I run it in applet mode, obviously the client running the applet should have the mysql...
1
by: ikrabbe | last post by:
Hi, I want to set up a mysql server in an embedded process. I managed to start the server in my program as described through mysql_server_init() Now I need a client connection to this...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
5
by: smatta | last post by:
I have just installed MySql version 5.0-18 on Red Hat Fedora Core 4. It is running but I cant connect to it using MySql Query Browser running on my pc. >From my pc, I can telnet to the sql...
2
by: zMisc | last post by:
I am using VB.NET 1.1 and cannot connect to a MySQL (v5) database. I've done the following: 1) Create a DSN for MyODBC. 2) Connect using: Driver=MySQL ODBC 3.51 Driver; Server=localhost; Data...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.