Avatar of Umesh
UmeshFlag for India asked on

Installing multiple MySQL servers on the same machine using bind address

There is one MySQL server running on standard port of 3306 on a machine. I'm trying to add another instance using a new bind-address but same port of 3306. This first instance is running via mysqld_safe (not via using mysqld_multi since there was only one instance initailly).

Now, trying to start the second instance using mysqld_multi with a newly created IP (or the network interface). So the server now has 2 IPs that resolve properly to different domains (that part is does not seem to be an issue).

Getting this error message when I start the second instance on 3306.

[ERROR] Can't start server: Bind on TCP/IP port: Address already in use
[ERROR] Do you already have another mysqld server running on port: 3306 ?
[ERROR] Aborting

However, I'm able to start the second instance using another port - 3307.  But the idea is to use the same port of 3306 for multiple instances.

Is there any issue having combination of servers running (one using mysqld_safe and other mysqld_multi)?  Is there a need to convert the first instance also using mysqld_multi to get this to work (since the first instance was being used by customers, I didn't get a chance to restart it).

Thanks.
MySQL Server

Avatar of undefined
Last Comment
Umesh

8/22/2022 - Mon
Roger Baklund

When running multiple instances on the same machine, each instance must have a separate port.

http://dev.mysql.com/doc/refman/5.0/en/multiple-servers.html
ASKER CERTIFIED SOLUTION
Roger Baklund

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
Umesh

It worked fine after converting the first one also into mysql_multi mode and adding a bind address to it
ASKER
Umesh

Thanks..
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23