File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes mysql connection on jserve Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "mysql connection on jserve" Watch "mysql connection on jserve" New topic

mysql connection on jserve

amit tantia

Joined: Jul 20, 2001
Posts: 5
I have just got jserve installed on our servers. I would like the exact instructions how to set up mysql for it. Mysql has already been installed on our server.
Joe Wolf
Ranch Hand

Joined: Jul 05, 2001
Posts: 42
I suppose it'd be difficult to give exact instructions. But given that JServ and MySQL are installed, you should now install a driver so servlets you can user JDBC for MySQL access.
Then, depending on what kind of security you want on your databases, you have to create a MySQL user someuser@"%" who has with the appropriate privileges. Do something like
GRANT ALL PRIVILEGES ON my_jdbc_database.* TO someuser IDENTIFIED BY 'somepassword';
For tighter security, replace "ALL PRIVILEGES" with "SELECT" or "UPDATE". After creating the user reload MySQL with
# ./mysqladmin reload �p
Then you create a servlet in your repository that can read data from my_jdbc_database. You can find example code on the web for this with the mm driver documentation.
I agree. Here's the link:
subject: mysql connection on jserve
jQuery in Action, 3rd edition