Lately I've been struggling with MySQL and it's data directory a lot.
At first, I've tried docker for multiple instances but our company doesn't prefer docker no one knows why.
So I come up with a solution.
Some information;
- Multiple servers (6) will send data (like multi-source replication) and one slave
- According to our manager, six is too much dangerous to create a multi-source one slave replica set
- I've ordered additional IP's and configured them.
- Right now, the slave server has 3 IP's from dedicated server provider.
- I can ping those IP's, I can connect to phpmyadmin with new IP's
- The only thing is not working is where MySQL puts the data
- I edited config files and changed all other IP's data directories and ports
- Config files I've edited are in > /etc/mysql/maridadb.conf.d/50-server(n).cnf
- But anytime I create some database in one other IP assigned MySQL, other MySQL IP's can also see and perform actions on it.
Below you can see the image for maria config's for different instances.
This part confuses me, since I separated them with different IP's and data directories, how they can still see others. Anytime I create a database in MySQL, it puts to /var/lib/mysql
.
How can I manage one server, multiple IP's-Ports and multiple MySQL databases without each other seeing/accessing them?
maria server config settings