How to access a remote mysql database using java

前端 未结 3 1700
不思量自难忘°
不思量自难忘° 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条回答
  •  旧时难觅i
    2021-01-07 09:36

    1. Put your database in host that is accessable by Internet.
    2. For each of the external ip addresses of each of the Applicaton host create a user on mysql.

      GRANT ALL PRIVILEGES TO database.* to `user1`@`APPLICATION_HOST_IP` identified by 'PASSWORD';
      

    Now user1 will have access from APPLICATION_HOST_IP IP.

提交回复
热议问题