I wonder if there is a way to connect mysql with java client, what i mean is:
if user updated record from machien2 then mysql will send signal to other users on the network, that tell the users (there is a new record added or updated).
so, is this possible? or i need to make an auto refresh method on my java application so the data can be updated each 5 seconds for example, but the problem is this method will cost me a bandwidth, so if i can refresh only when data added or updated then that will be great.
I think thats not possible with any DBMS, for such appications you can use JMS (Java Messageing Service). My preferred imlementation is HornetQ from JBoss. You find other implementations at https://en.wikipedia.org/wiki/Java_Message_Service
With there you should use the Publish/Subscribe Pattern to send and recive events.