-3

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?

Should I give IP address of system A in database url. eg.

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

Will this work properly?

Or

do i have to use RMI?

pritam parab
  • 85
  • 2
  • 10

1 Answers1

1

What do you mean by database on system B?

Of Course you should use JDBC not RMI

Zaid
  • 11
  • 1
  • I have installed MySql on system say "B". I want to connect to the database remotely. Means I want to access MySql database from another system... – pritam parab Mar 23 '18 at 07:29