473,396 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 4111
"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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.