There was an old system on Centos 5.5 which pattern as below:
- OS:CentOS release 5.5 (Final)
- Web Server:Apache 2.2.3
- AP Server:Tomcat 6.0.3.6
- JDK:1.6.0_37-b06
- DB:MySQL 5.5.27-1
As customer requires, I have to install duplication of everything(Apache, Tomcat, Mysql, Java) on the same machine without making any changes and effects on their server. I did some tests on a virtual machine and I got problems with mysql. My tests with versions of mysql are 5.5.27 and 5.16.19 with different datadir, port, even my.cnf configuration
[root@localhost ~]# vim /usr/local/src/mysql5.5.27/my.cnf
mysql5.5.27
basedir = /usr/local/src/mysql5.5.27
datadir = /usr/local/src/mysql5.5.27/data
port = 3306
socket = /tmp/mysql5.5.27.sock
[root@localhost ~]# vim /usr/local/src/mysql5.6.19/my.cnf
mysql5.6.19
basedir = /usr/local/src/mysql5.6.19
datadir = /usr/local/src/mysql5.6.19/data
port = 3307
socket = /tmp/mysql5.6.19.sock
Two services are starting OK without errors But the problem is I try login to mysql, I got this error
Can't connect to local MySQL server through socket '/tmp/mysql.sock'
Please, if anyone has any experience with multiple instances of mysql? Please help me to understand this circumstances.
※ I want to separate the configuration files of 2 instances of mysql.