简体   繁体   中英

Exporting eclipse java Desktop base application with database MySQL

I have created my project in eclipse which is a Timetable application and database MySQL is used for data. now i want to run my application on clients computer i have created jar file and exported database file. the problem is i am unable to understand how to connect database on clients computer, even if i will install server but how will program find database location?

There are two cases here:

Case 1: The DB that you used to connect to the application is in the same network as your client's system, then you can use the same DB.

Case 2: If your client is in different network, then you need to install a DB there and replace the connection strings that you used to connect to your DB with the new connection strings. These connection string are nothing but URL to the DB with username and password which of course you would know.

Regarding your doubt, If the DB is installed at your clients, the DB shall be available at a local IP address. Use this local address to connect form your clients application. When applications are in the same network, they can identify each other.

Hope that paints a picture.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM