List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:June 11 2001 4:53pm
Subject:Re: another query, please help
View as plain text  
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?

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

Your connnection URL should look something like this:


Paul DuBois, paul@stripped
another query, please helpUnknown Sender11 Jun
  • Re: another query, please helpPaul DuBois11 Jun