 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Eureka Guest
|
Posted: Sat Jul 19, 2003 6:52 am Post subject: MySQL and Java... |
|
|
Hi,
*
This is probably a FAQ, but I am doing what Connector/J Documentation tells
me to do...it still cannot work...so, please read on...
*
I am trying to write an applet that will display some data from a database
server.
I run apache, mysql on the same machine (say, 192.168.1.2) and privileges
have been granted to root @ 192.168.1.1 and 192.168.1.2.
I test my application implement from 192.168.1.1 and it works fine, which
implies TCP connection to mysql is working.
However, when I access the applet implement from 192.168.1.1 via web
browser, Java Console would report a java.security.AccessControlException.
But...the applet is served by the very same machine that runs mysql! What
did I miss? (I put the applet on the machine running mysql, without signing
the applet)
Thank you very much!!
Have a nice day!
Eureka
|
|
| Back to top |
|
 |
Eureka Guest
|
Posted: Sat Jul 19, 2003 3:17 pm Post subject: Re: MySQL and Java... |
|
|
Good news:
It now works after I siwtched to mysql-connector-java-2.0.14.jar
Bad news:
Hmm...in order to test more, I open the page containing this applet from
anther IP (say, 192.168.1.4) which has not been granted. Of course, MySQL
stops this connection. I then
grant all privileges on mysql.* to root@'192.168.1.%';
grant all privileges on mysql.* to root@'%';
But...there is still java.sql.SQLException: Invalid authorization
specification: Access denied for user: 'root (AT) 192 (DOT) 168.1.4' (Using password:
YES)
What am I doing wrong?
Eureka <is84007 (AT) cissol7 (DOT) cis.nctu.edu.tw> ´£¨ì:
| Quote: | The exception is:
java.sql.SQLException: Unable to connect to any hosts due
to exception: java.security.AccessControlException: access denied
(java.util.PropertyPermission file.encoding read)
|
| Quote: | Eureka <is84007 (AT) cissol7 (DOT) cis.nctu.edu.tw> ´£¨ì:
Hi,
*
This is probably a FAQ, but I am doing what Connector/J Documentation tells
me to do...it still cannot work...so, please read on...
*
I am trying to write an applet that will display some data from a database
server.
I run apache, mysql on the same machine (say, 192.168.1.2) and privileges
have been granted to root @ 192.168.1.1 and 192.168.1.2.
I test my application implement from 192.168.1.1 and it works fine, which
implies TCP connection to mysql is working.
However, when I access the applet implement from 192.168.1.1 via web
browser, Java Console would report a java.security.AccessControlException.
But...the applet is served by the very same machine that runs mysql! What
did I miss? (I put the applet on the machine running mysql, without signing
the applet)
Thank you very much!!
Have a nice day!
Eureka
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|