MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Sanjeev Sagar Date:September 9 2004 5:30pm
Subject:RE: Multiple MysQL servers with different IP address on same machine
View as plain text  
Actually mysqld parameter bind-address work great for different IP addresses on same port
for different servers on same machine. One can use -h <hostname> for clients
connection to a specific MySQL database server. 

Thanks !


-----Original Message-----
From: Peter Lovatt [mailto:pjln1@stripped]
Sent: Thu 9/9/2004 9:51 AM
To: SGreen@stripped; Sanjeev Sagar
Cc: mysql@stripped; Sanjeev Sagar
Subject: RE: Multiple MysQL servers with different IP address on same machine
 
Hi

We have a machine with 2 IP addresses and mysql 3.23 on one and 4.10 on the
other. Both using port 3306

One instance listens on localhost, which maps to 127.0.0.1, and also on one
of the public IP addreses and the other listens to the other IP address.

I use the IP address in the connection string and so far it  works fine. I
am in the process of setting up the server, and only have phpmyadmin
installed (twice - one installation per mysql server) but that works
correctly, so I expect everything  else will.

HTH

Peter




> -----Original Message-----
> From: SGreen@stripped [mailto:SGreen@stripped]
> Sent: 09 September 2004 14:53
> To: Sanjeev Sagar
> Cc: mysql@stripped; Sanjeev Sagar
> Subject: Re: Multiple MysQL servers with different IP address on same
> machine
>
>
> I need to add to my previous post -- You asked about using the SAME
> operating system socket as well as using separate addresses with the same
> port number (different IP sockets)
>
> My answer to that is NOT ON YOUR LIFE. Think of the chaos. If one client
> tried to connect to an OS socket that 3 different servers were listening
> to... Which one gets the connection? Which one validates the client? If
> for some reason the client *were* able to validate against all three
> servers at the same time, how could it sort out the 3 different responses
> to a query?
>
> NO each server must have it's own socket. It doesn't matter if we are
> discussing "IP sockets" or "OS sockets" the answer is still the same.
>
> Sorry for the previous oversight,
>
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine
>
> "Sanjeev Sagar" <sanjeev.sagar@stripped> wrote on 09/08/2004
> 05:04:38 PM:
>
> >
> > Hello All,
> >
> > MySQL : Standar Binary 4.0.20
> > O/S : Red Hat Linux release 9 (Shrike)
> > Linux  2.4.20-31.9smp #1 SMP Tue Apr 13 17:40:10 EDT 2004 i686 i686
> > i386 GNU/Linux
> >
> > I already have setup of Three Multiple MySQL servers listening on
> > different ports and sockets on same machine
> >
> > Option File:
> >
> > [mysqld1]
> > server-id =1
> > port=3306
> > socket=/tmp/mysql.sock
> > datadir=data1
> >
> > [mysqld2]
> > server-id=2
> > port=3307
> > socket=/tmp/mysql.sock2
> > datadir=data2
> >
> > [mysqld3]
> > server-id=3
> > port=3308
> > socket=/tmp/mysql.sock3
> > datadir=data3
> >
> > All three servers started with no problem. Question is if I don't
> > want to use different ports or scokets, can I use the different I.P.
> > Addresses on same machine for three servers with same default port or
> socket.
> >
> > /etc/hosts file
> > ===============
> >
> > 127.0.0.100  s1
> > 127.0.0.101  s2
> > 127.0.0.102   s3
> >
> >
> > Can I start three servers on  same port (3306), same socket
> > (/tmp/mysql.sock) on same machine by using above IP addresses? If
> > yes then HOW?
> >
> > Can I use the replication in b/w them? keeping datadir and log-bin
> > directory differtent is not a problem.
> >
> > Appreciate it.
> >
>




Thread
Multiple MysQL servers with different IP address on same machineSanjeev Sagar8 Sep
  • Re: Multiple MysQL servers with different IP address on same machineleegold8 Sep
  • Re: Multiple MysQL servers with different IP address on same machineSGreen9 Sep
  • Re: Multiple MysQL servers with different IP address on same machineSGreen9 Sep
    • RE: Multiple MysQL servers with different IP address on same machinePeter Lovatt9 Sep
RE: Multiple MysQL servers with different IP address on same machineSanjeev Sagar9 Sep