At 12:23 PM +0530 6/11/01, Rohit Peyyeti wrote:
>Hello All:
>
>I am trying to access second mysql server which is running on port
>3308 through java. Even when I specify port number in my connection,
>it still connecting to the database running on port 3307.
>
>When i try to access 2nd mysql server through command prompt it works!
>This is the way i access my 2nd mysql server through command prompt:
>'mysql -u root -S/var/lib/mysql2/mysql.sock2 -P3308 -p'
>
>Whereas if I say:
>'mysql -u root -p'
>
>It connects to my default mysql server running on port 3307. How do
>achieve this using JDBC? How do I connect to two different mysql
>servers? Using port numbers does not seem to help. Do I have to
>specify any socket file here too??? Have no idea here!
>
>Any Ponters?
>
>...Rohit

This question would be better posed to the MySQL Java mailing list.

Your connnection URL should look something like this:

        jdbc:mysql://host_name:port_number/db_name


-- 
Paul DuBois, [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to