Importing MySQL dumps to multiple MySQL instances in one machine
0
votes
1
answer
194
views
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 /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.

Asked by emir ko
(1 rep)
Oct 1, 2021, 09:24 AM
Last activity: Jul 3, 2025, 12:06 PM
Last activity: Jul 3, 2025, 12:06 PM