MySQL 5.5.58 Installing Multiple Instances on RHEL7

MySQLmysql-5.5mysqld-multi

I am Avinash.

I am willing to install an additional MySQL instance on a UAT server for testing purposes. I am using MySQL Community Server 5.5.58 installed on RHEL7.2.

I am going through the MySQL Docs https://dev.mysql.com/doc/refman/5.5/en/multiple-servers.html , which tells me that I would require certain unique operating parameters such port, socket, pid, datadir and log files related parameters. To achieve better performance, it also recommends to use different tmpdir. This is well understood.

I can either use different binaries or the same binary for this purpose.

If I am using same binary, I'll have to use mysqld_multi and use the same config file. If I use mysqld_multi, I'll have to put different sections for mysqld daemon such as mysqld1, mysqld2 and so on. All using unique values for above mentioned operating parameters.

Please help me out here. Am I correct about mysqld_multi?

My second question is about bind-address variable.
https://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_bind-address
Here, it explains that "The MySQL server listens on a single network socket for TCP/IP connections. This socket is bound to a single address, but it is possible for an address to map onto multiple network interfaces."

My question is that will I need an additional NIC and an additional IP address for the second MySQL instance?

For the existing instance, I have disabled the bind-address option.
Do I need to add the bind-addresses for both the instances.

Also, the second instance will be used only by me (for now).

Thanking you.

Best Answer

why dnt you start new instance with different cnf file (keeping diffrent PORT and diffrent socket file)

for example :

cd /opt/mysql_installation/u01/mysql_5.7.17/bin/ ./bin/mysqld_safe --defaults-file=/opt/mysql_installation/my.cnf &

Related Question