Two instances of mysql server.

Two instances of mysql server.

am 11.04.2005 13:01:31 von JHN

------_=_NextPart_001_01C53E85.D16D2C78
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,
=20
I want to have two instances of mysql server on one PC.I need to have =
both servers to listen on port 3306, so I have configured the NIC to =
have two IP addresses.
10.10.100.11 and 10.10.100.13.
=20
my1.cnf file is like this
[mysqld]
basedir=3DC:/mysql
bind-address=3D10.10.150.11
datadir=3DC:/mysql/data1
skip-innodb

my2.cnf is like this
[mysqld]
basedir=3DC:/mysql
bind-address=3D10.10.150.12
datadir=3DC:/mysql/data2
skip-innodb

I install the servers as services like this:
c:\mysql\bin\mysqld-nt.exe --install mysql1 =
--defaults-file=3D"C:\mysql\my1.cnf"
c:\mysql\bin\mysqld-nt.exe --install mysql2 =
--defaults-file=3D"C:\mysql\my2.cnf"
=20
And I start the services like this:
net start mysql1
net start mysql2
=20
The mysql1 service starts fine.
=20
However the mysql2 service dies with this error:
System error 1067 has occurred.
=20
What am I doing wrong??
=20
=20
TIA
Jesper

------_=_NextPart_001_01C53E85.D16D2C78--

Re: Two instances of mysql server.

am 11.04.2005 16:16:56 von Daniel da Veiga

I don't think there is a way to set both servers for the same port at
the same machine, no matter how many interfaces you have, it will
listen for TCP/IP, incomming from any connections. A single host can
only set a single server to listen at the same port, the second server
dies because of this (probably), to see if that's your problem, set
the second server to listen on 3307 and see if it will run.

I am not a network expert, so, if anyone knows of a way to run two
servers listening the same port, let me know too.

Best regards,

On Apr 11, 2005 8:01 AM, Jesper H=F8rup wrote:
> Hi,
>=20
> I want to have two instances of mysql server on one PC.I need to have bot=
h servers to listen on port 3306, so I have configured the NIC to have two =
IP addresses.
> 10.10.100.11 and 10.10.100.13.
>=20
> my1.cnf file is like this
> [mysqld]
> basedir=3DC:/mysql
> bind-address=3D10.10.150.11
> datadir=3DC:/mysql/data1
> skip-innodb
>=20
> my2.cnf is like this
> [mysqld]
> basedir=3DC:/mysql
> bind-address=3D10.10.150.12
> datadir=3DC:/mysql/data2
> skip-innodb
>=20
> I install the servers as services like this:
> c:\mysql\bin\mysqld-nt.exe --install mysql1 --defaults-file=3D"C:\mys=
ql\my1.cnf"
> c:\mysql\bin\mysqld-nt.exe --install mysql2 --defaults-file=3D"C:\mys=
ql\my2.cnf"
>=20
> And I start the services like this:
> net start mysql1
> net start mysql2
>=20
> The mysql1 service starts fine.
>=20
> However the mysql2 service dies with this error:
> System error 1067 has occurred.
>=20
> What am I doing wrong??
>=20
> TIA
> Jesper
>=20
>=20


--=20
Daniel da Veiga
Computer Operator - RS - Brazil

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

Re: Two instances of mysql server.

am 11.04.2005 19:09:23 von miguel solorzano

At 11:16 11/4/2005, Daniel da Veiga wrote:
>I don't think there is a way to set both servers for the same port at
>the same machine, no matter how many interfaces you have, it will
>listen for TCP/IP, incomming from any connections. A single host can
>only set a single server to listen at the same port, the second server
>dies because of this (probably), to see if that's your problem, set
>the second server to listen on 3307 and see if it will run.

There is a code at server start that aborts if the same port is already
in use:

So must use a different port for a second instance server.




Regards,

Miguel Angel Sol=F3rzano
S=E3o Paulo - Brazil



--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

Re: Two instances of mysql server.

am 11.04.2005 20:57:12 von SGreen

--=_alternative 006865DD85256FE0_=
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

Miguel Angel Solorzano wrote on 04/11/2005 02:09:23 PM:

> At 11:16 11/4/2005, Daniel da Veiga wrote:
> >I don't think there is a way to set both servers for the same port at
> >the same machine, no matter how many interfaces you have, it will
> >listen for TCP/IP, incomming from any connections. A single host can
> >only set a single server to listen at the same port, the second server
> >dies because of this (probably), to see if that's your problem, set
> >the second server to listen on 3307 and see if it will run.
>=20
> There is a code at server start that aborts if the same port is already
> in use:
>=20
> So must use a different port for a second instance server.
>=20
>
>=20
>=20
> Regards,
>=20
> Miguel Angel Sol=F3rzano
> S=E3o Paulo - Brazil
>=20

It shouldn't make a difference if the two servers are configured to use=20
DIFFERENT addresses as each ADDRESS/PORT combination is supposed to be=20
UNIQUE to TCP. If one server instance opens port 3306 on just one of the=20
available IP addresses (because that is the one he told it to bind to)=20
that means that port 3306 should be available on the other for the second=20
server instance to use, correct or not?=20

I think what the OP is compaining about is that somehow the first server=20
instance is binding to BOTH addresses when he tried to tell it to use only =

the one. I don't have a two-server install to test with or I could help.=20

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
--=_alternative 006865DD85256FE0_=--

Re: Two instances of mysql server.

am 11.04.2005 23:04:43 von Dijital

Two instances can run on the same machine on the same port provided
there are two different addresses to use. All you need to do is change
the bind_address in each instance's configuration to the specific IP you
want it to use.

Thus, if you have 2 NICs in your server, one with IP 192.168.0.10 and
the other with 192.168.0.11 then just specify those addresses in each of
the two instances' configuration. Note, you probably only want to do
this on a box that has static addresses. Cheers.

Armando

SGreen@unimin.com wrote:
> Miguel Angel Solorzano wrote on 04/11/2005 02:09:23 PM:
>
>
>>At 11:16 11/4/2005, Daniel da Veiga wrote:
>>
>>>I don't think there is a way to set both servers for the same port at
>>>the same machine, no matter how many interfaces you have, it will
>>>listen for TCP/IP, incomming from any connections. A single host can
>>>only set a single server to listen at the same port, the second server
>>>dies because of this (probably), to see if that's your problem, set
>>>the second server to listen on 3307 and see if it will run.
>>
>>There is a code at server start that aborts if the same port is already
>>in use:
>>
>>So must use a different port for a second instance server.
>>
>>
>>
>>
>>Regards,
>>
>>Miguel Angel Solórzano
>>São Paulo - Brazil
>>
>
>
> It shouldn't make a difference if the two servers are configured to use
> DIFFERENT addresses as each ADDRESS/PORT combination is supposed to be
> UNIQUE to TCP. If one server instance opens port 3306 on just one of the
> available IP addresses (because that is the one he told it to bind to)
> that means that port 3306 should be available on the other for the second
> server instance to use, correct or not?
>
> I think what the OP is compaining about is that somehow the first server
> instance is binding to BOTH addresses when he tried to tell it to use only
> the one. I don't have a two-server install to test with or I could help.
>
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: Two instances of mysql server.

am 12.04.2005 04:11:12 von Christian Surya

Hi,
I think you should check your my2.cnf
you said that you have ip 10.10.100.13 but your bind-address at
my2.cnf is 10.10.100.12, try change to 10.10.100.13

HTH
Christian

On Apr 11, 2005 6:01 PM, Jesper H=F8rup wrote:
> Hi,
>=20
> I want to have two instances of mysql server on one PC.I need to have bot=
h servers to listen on port 3306, so I have configured the NIC to have two =
IP addresses.
> 10.10.100.11 and 10.10.100.13.
>=20
> my1.cnf file is like this
> [mysqld]
> basedir=3DC:/mysql
> bind-address=3D10.10.150.11
> datadir=3DC:/mysql/data1
> skip-innodb
>=20
> my2.cnf is like this
> [mysqld]
> basedir=3DC:/mysql
> bind-address=3D10.10.150.12
> datadir=3DC:/mysql/data2
> skip-innodb
>=20
> I install the servers as services like this:
> c:\mysql\bin\mysqld-nt.exe --install mysql1 --defaults-file=3D"C:\mysq=
l\my1.cnf"
> c:\mysql\bin\mysqld-nt.exe --install mysql2 --defaults-file=3D"C:\mysq=
l\my2.cnf"
>=20
> And I start the services like this:
> net start mysql1
> net start mysql2
>=20
> The mysql1 service starts fine.
>=20
> However the mysql2 service dies with this error:
> System error 1067 has occurred.
>=20
> What am I doing wrong??
>=20
> TIA
> Jesper
>=20
>

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

RE: Two instances of mysql server.

am 12.04.2005 09:44:41 von JHN

Hi All,
thanks for your valuable input.

The problem is now solved and I am running 2 Mysql servers on the same =
PC with One NIC.
And both servers are listning on port 3306!

first error was a typo regarding the second IP address It should be .13 =
instead of .12

Second error was that the two configuration files had extension .ini =
instead of .cnf
This caused mysqld-nt to install the services with default properties =
(datadir=3D C:/mysql/data)
Then it's obvious that when the second service tries to start, the data =
files is already in use...

And finally a warning!
When you bind the mysql service to a specific IP address - be sure that =
root (or any other superuser) has access from everywhere!!!
e.g. if root only have access from localhost you cannot login as root!!
root must have access from % and/or from the IP the server is bind to.

regards,
newbie DBA
Jesper

-----Original Message-----
From: Jesper H=F8rup [mailto:JHN@rtx.dk]
Sent: 11. april 2005 13:02
To: win32@lists.mysql.com
Subject: Two instances of mysql server.


Hi,
=20
I want to have two instances of mysql server on one PC.I need to have =
both servers to listen on port 3306, so I have configured the NIC to =
have two IP addresses.
10.10.100.11 and 10.10.100.13.
=20
my1.cnf file is like this
[mysqld]
basedir=3DC:/mysql
bind-address=3D10.10.150.11
datadir=3DC:/mysql/data1
skip-innodb

my2.cnf is like this
[mysqld]
basedir=3DC:/mysql
bind-address=3D10.10.150.12
datadir=3DC:/mysql/data2
skip-innodb

I install the servers as services like this:
c:\mysql\bin\mysqld-nt.exe --install mysql1 =
--defaults-file=3D"C:\mysql\my1.cnf"
c:\mysql\bin\mysqld-nt.exe --install mysql2 =
--defaults-file=3D"C:\mysql\my2.cnf"
=20
And I start the services like this:
net start mysql1
net start mysql2
=20
The mysql1 service starts fine.
=20
However the mysql2 service dies with this error:
System error 1067 has occurred.
=20
What am I doing wrong??
=20
=20
TIA
Jesper

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org