• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mysql with Java swing Over multiple computers

 
Prakash Velusamy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am working on simple desktop based java swing billing application which has to work multiple computers.mysql db should has to be shared with every computers over LAN.

in this case should i use an application server?or is it enough to specify ip address of server system in jdbc connection like

connection = DriverManager .getConnection("jdbc:mysql://ipaddress of server
system(192.168.1.1):3306/dbname","root", "password");

Kindly help me to understand the better method. Thanks in advance.
 
Campbell Ritchie
Sheriff
Posts: 51349
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have posted where we usually discuss the website itself. I shall try moving this discussion to our databases fora.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would be better to have a web/server URL that serves the data. While what you describe will work, it requires giving the database password on the server to every user of your code.
 
Paul Clapham
Sheriff
Posts: 21559
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Jeanne suggests, security could be an issue. So if your LAN is two or three computers belonging to family members, you could just have the application connect directly to the database. But if it's several thousand computers distributed over many floors of an office, then security is definitely an issue and you'll want to put the suggested web front-end in place to prevent people from hacking your DB.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic