Re: Multiple MysQL servers with different IP address on same machine

2004-09-09 Thread SGreen
An IP socket is the unique combination of an IP address and a port 
number. I don't see why you couldn't run those separate instances of your 
db servers on the same port but each with their own addresses as they 
would each have their own unique IP socket. I don't think you would 
create any collisions or contentions beyond that of pure network 
congestion.

My tentative answer is: It should work fine but I have not tried it yet 
so I don't know from personal experience

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Sanjeev Sagar [EMAIL PROTECTED] 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.
 


Re: Multiple MysQL servers with different IP address on same machine

2004-09-09 Thread SGreen
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 [EMAIL PROTECTED] 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.
 


RE: Multiple MysQL servers with different IP address on same machine

2004-09-09 Thread Peter Lovatt
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 09 September 2004 14:53
 To: Sanjeev Sagar
 Cc: [EMAIL PROTECTED]; 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 [EMAIL PROTECTED] 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.
 




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Multiple MysQL servers with different IP address on same machine

2004-09-09 Thread Sanjeev Sagar
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:[EMAIL PROTECTED]
Sent: Thu 9/9/2004 9:51 AM
To: [EMAIL PROTECTED]; Sanjeev Sagar
Cc: [EMAIL PROTECTED]; 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 09 September 2004 14:53
 To: Sanjeev Sagar
 Cc: [EMAIL PROTECTED]; 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 [EMAIL PROTECTED] 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.
 






Re: Multiple MysQL servers with different IP address on same machine

2004-09-08 Thread leegold
The example below renames a col. But can I rename a col. w/out giving
all that type spec. at the end of the statement below. I just want to
rename everything else stays the same. Thanks.

mysql ALTER TABLE search CHANGE Description PageDescription
VARCHAR(255) NOT NULL;

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]