0

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

6
  • You say that you're "struggling with the Data Directory" and that what's "not working" is where MySQL/MariaDB puts its data. The rest of your posting is about something completely different, as far as I can tell. Forget this overly-complex, Heath Robinson attempt - what problem are you actually trying to solve? What's "not working"? Commented Oct 6, 2021 at 12:57
  • MySQL always puts the data to /var/lib/mysql even though I configure the data-dir as other location. Commented Oct 6, 2021 at 13:01
  • Post the configuration file in which you made this change. Commented Oct 6, 2021 at 13:16
  • Is the server "in house" or is it provided by a Cloud company? Commented Oct 6, 2021 at 15:09
  • How are you telling it to look in [mysql1] and not in [mysql] ? Commented Oct 6, 2021 at 15:11

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.