0

I want to run two instances of MySQL on one CentOS 7 machine. And I need to run instances on different users. Reason for this approach is need for limiting resources (CPU and memory) for each instance, because I don't want situation where one instance (serving one application) utilize all resources, so other database (and app) will be slow or non-functional.

If there is other way than two instances, feel free to suggest solution, but keep in mind that limits on query and connection number for specific database user is not solution for my case.

So, I've tried with this solution : run multiple instances of MySQL CentOS7

but only one instance is started .

In short: I want to run two instances, one on user mysql, one on user mysql2 on one machine, on different ports ofcourse.

0

You will need to copy the systemd script for mysql, and name it something new,it will most likely be mariadb.service, so you will copy it and create a mariadb2.service file, and then edit the file to point to your 2nd my.cnf file.

These systemd files are located in /etc/systemd/system/ however most are links to /usr/lib/systemd/system/servicename.service

after this you can do things like service mariadb2 start/stop and systemctl enable mariadb2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.