• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

mysql connection on jserve

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
http://www.mysql.com/downloads/api-jdbc.html
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.
reply
    Bookmark Topic Watch Topic
  • New Topic