[Lvlug] java and mysql permissions

Dann S. Washko dann at thelinuxlink.net
Fri Apr 8 14:58:14 EDT 2005


We have a teacher at work trying to use a mysql database running on a 
linux box to teach java.  I keep getting hit up with questions regarding 
connecting to mysql using java and I know very little java.

 From the get go I wondered about permissions with mysql and connecting 
via java because you can run java from the machine hosting mysql server 
and you can use the client's java to execute java code and applets 
through a web browser.

Right now he is trying to get an applet connected to the mysql database 
and it is erroring out.  Now is this a java issue or a mysql permissions 
issue.

I await his response on how he is trying to use this applet, whether 
local to the mysql server or from a client machine.

Right now there are no permissions in place to allow outside connections 
  to the databases he is using, so I am thinking this may be a mysql 
permissions issue.

This is part of the issue he sent me:

******

I am getting a security issue when trying to hit the database throught
an applet.

Can you try to run this?

I need to set a security policy file called policy.txt with
the line

grant { permission java.security.AllPermission; };

Then you need to run the program with the java command

           java -Djava.security.policy=policy.txt

That should work

******

Now my understanding is that I need a java app to run with this and the 
syntax should be:

java -Djava.security.policy=policy.txt somejavaapp

Of course I do not have a java app to run so I cannot see if I am correct.



-- 
Dann S. Washko
The Linux Link Web Radio Portal
Check Us Out
http://www.thelinuxlink.net
get slack (www.slackware.com) and get happy



More information about the Lvlug mailing list