How to access a remote mysql database using java

前端 未结 3 1705
不思量自难忘°
不思量自难忘° 2021-01-07 09:22

I have already developed a JAVA SWING Application. I want to install this application in several computers which all have access to

3条回答
  •  梦谈多话
    2021-01-07 09:44

    It's not very common to allow access to a database directly over the internet for security (authentication authorization, encryption) and performance reasons. In most cases, you would create a web-based server application which can perform database operations, enforcing business, domain, and security rules. The client application makes calls over the internet (using REST calls, AJAX calls, or something proprietary), and gets the results back from the server.

    In your case, since your client software is Java, you may want to research Java Servlets and run something lightweight like Tomcat as a serer.

    Please see this page and this page for an explanation of client-server relationships.

提交回复
热议问题