java application implementation
java application ekak api develop karadi localhost/port dala develop karata api eka implement karadi ethanta ip ekak dana one server ,eth ape normal pc ekak server ekak akranwan ethana ip ekak damata wadak na modka dynamic ip ne apita thiyane, meka overcome karana man pc eka static ip hadla mysql db server ekak host kara pc ekaka, itapse client pc eka java applicaiton thiyana ekata ee server pc eka ip ekai port ekai dela baluwa eth connect wen nane db ekata,
kohmda hari widhata meka karagne, big help
mysql kohomada install kare. mysql remote connection default off karala thiyenne oyata manual on karanna wenawa. oyage prashne pahadili madi. oya local server ekak da hadanne ?
dev_lak last edited by
java application ekt client machine eken connect wenwda?
mehami api gamu server and client pc dekak
server pc eka mysql install karanwa harida, itapse client pc eka danwa java pos ekak, itapse ee java pos eka ara server eka mysql db ekata connect wene one
network type : lan
machan lan eka thiyana server pc ekai client pc ekai
dan mysql eka manaully denwan client pc eka ip eka duanm hari nedha ( client pc ekta static ip ekak set akrana one nehda?)
ethakota firewall eka rule ekak liyanath one ne 3306 port arina kiyala server eka ?
oya localhost ekata dne mokada client pc eka duwana software eka
server eka db eka dala client eka java applcation eka dala ee java app eka ara server eka db ekata connect karagana one
machan mysql default remote login off karala thiyenne. oya manual remote login on karanna one e wagema mysql port eka allow karanna one firewall eken.
java SE ekak neda oya
Step 1: Choose which of the PCs will be the server. In other words, which among the PCs will be your server. Your chosen PC-server will have a server application(e.g. XAMPP) installed. This PC is where you will import your existing database (.sql file). Other PCs don't have to have XAMPP(or other server applications) installed on them. Other PCs only need to have a copy of the desktop application that you created. No need to set other PCs with server application and sql.
This PC-server that you have chosen will have a connection string with localhost since I assume that all of them are not accessing the internet to use the database.
Step 2: Grant privileges to the database that was setup on your chosen PC-server The simplest example is the one below.
grant all privileges on db_name.* to 'username'@'localhost' identified by 'password';
Don't forget to replace with your connections' username and password
But you may also select certain privileges based on your preference.
Set other PCs' connection string that has copy of the desktop application you created.
If PC-server has an IP Address of let's say 192.168.2.3 then, the connection string of other PCs will be
Other PCs will connect using the PC-Server's IP address since our database and server application was setup on PC-Server.
I hope this helps and others who might see this question.
THANKS , these are steps that I was searching for
@ChrisSachintha ok bro