List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 5 2000 2:35am
Subject:RE: Two MySQL servers
View as plain text  
At 6:25 PM -0600 2000-04-04, Jason wrote:
>It's pretty frustrating, I've tried both of those and couldn't get either to
>work.  I changed the MySQL configuration so it runs off the same executable
>but with different sockets, two seperate data directories, and on different
>ports, rather than two different executables.  When I try the two forms of
>connection, I still can't connect.  It seems to still be connecting to the
>other port and socket.  It's actually giving me a permission denied error.
>If I enter a valid username and password for the other socket and port (even
>though I specify differently), then I can connect.  Seems weird...

Can you verify from looking in the log files of the various servers
which one your connection attempts actually are connecting to?  Are
they always going to the same one?

>>  -----Original Message-----
>>  From: Paul DuBois [mailto:paul@stripped]
>>  Sent: Tuesday, April 04, 2000 5:55 PM
>>  To: jasonc@stripped
>>  Cc: mysql@stripped
>>  Subject: RE: Two MySQL servers
>>  >Paul,
>>  >
>>  >Thanks for your help.  I was refered to your book by someone on the PHP
>>  >mailing list.  He said there was a good chapter covering this.
>>  We ordered
>>  >your book but we've gotten past the installation part.  I'm able
>>  to connect
>>  >to this install via the command line by specifying the port and socket.
>>  >When I try the same using the php command
>>  >mysql_connect("localhost:3307:/tmp/mysql2.sock","user","pass");
>>  , it won't
>>  >connect.  Php is properly configured with MySQL support and I can access
>>  >another install on MySQL easily.  Any suggestions?
>>  Well, lessee ... I'm going to cheat and look in my book because I can't
>>  remember all the stuff that's in there. :-)
>>  According to page 676, you should be able to specify the first parameter
>>  to mysql_connect as "host_name:port_num" (this will use a TCP/IP
>>  connection)
>>  or as "localhost:/path/to/socket" (this will use a UNIX domain socket
>>  connection).  Looks to me like you're trying to combine the two forms
>>  and specify both a port number and path to a socket.  Try these and
>>  see what happens:
>>  mysql_connect("your-host-name:3307","user","pass")
>>       or die ("cannot connect");
>>  mysql_connect("localhost:/tmp/mysql2.sock","user","pass")
>>       or die ("cannot connect");
>>  (Also, the first form requires PHP 3.0B4 or newer and the second form
>>  requires 3.0.10 or newer.)
>>  --
>  > Paul DuBois, paul@stripped

Paul DuBois, paul@stripped
Two MySQL serversJason Cox4 Apr
  • Re: Two MySQL serversDan Sjolseth4 Apr
    • RE: Two MySQL serversJason5 Apr
      • RE: Two MySQL serversPaul DuBois5 Apr
        • RE: Two MySQL serversJason5 Apr
          • RE: Two MySQL serversPaul DuBois5 Apr
            • RE: Two MySQL serversJason5 Apr
              • RE: Two MySQL serversPaul DuBois5 Apr
                • synchronization over WebRobert Schott2 May