what is the best way to connect remote mysql database through java/jdbc? : <p>I have two systems A and B. On system "A" I have mysql database running. On another system "B" i have swing application running which connects to to the remote database on system "A". I have both the systems on same LAN.
How should i connect to that database?</p>

<p>Should I give IP address of system A in database url.
eg.</p>

<pre><code>Connection con=DriverManager.getConnection("jdbc:mysql://192.168.20.10:3306/mydb?zeroDateTimeBehavior=convertToNull","root","root");
</code></pre>

<p>Will this work properly?<br><br>
Or<br><br>
 do i have to use RMI?</p>
