In case of title is not clear, I would like to explain myself further. I have 6 MySQL instances in my server. Let's call them, M1, M2, .., M6.
The reason I have 6 MySQL instances here, I have also other 6 servers which is hosting other websites. This server (according to my plan) will be acting as a Disaster Recovery Server. What my plan is;
- Create replication from each other server to instances in DR Server.
- Each instance will be slaves of other servers MySQL replication.
- Phpmyadmin as GUI for my manager.
What I couldn't figure out is to make instances to be separate from them.
Anytime I import a DB like this;
mysql -u root -p xxxx -S /var/run/mysqld/xxxx.sock --host xxx.xxx.xx.xxx < /home/user/xxxx.sql
Which I edited my.cnf file and created instances, which they're all up and running, I also checked it with netstat -telpn, and ports are listening.
After I use above command and import dump to database, all other MySQL instances also can see this database in PhpMyAdmin.
I already setup phpmyadmin to allow me to check all databases in one url, buy adding $cfg.['server'] and port etc.
But when I import MySQL dump to specific instance, how can other instances have access to that database?
PS: Each instances has their own data paths;
- M1 > /var/lib/M1
- M2 > /var/lib/M2
edit for clarification:
My question is, how can I setup a multiple MySQL instances in one machine, and let those MySQL's be a replica member of another servers master. While doing this, by accessing those databases via phpmyadmin, any instances shouldn't access to other data.
M1 replication can access > M1 master's replication M2 can access > M2 master's.