0

I have 2 seperate MySQL 8 instances running on Ubuntu 20.04. One starts via systemd "normaly" and the other one I can invoke by using:

mysqld_safe --defaults-file=/home/username/mysqld_replica.cnf &

Now that everything is running I was investigating on how to start the second instance on boot. I discovered mysqld_mulit and wonder now if:

  1. What are the advantages of mysqld_multi over seperate config files?
  2. How I can start the second instance on boot if not using mysqld_multi
3
  • why multiple instances on a server at all? there are only s much resources that have to be shared.
    – nbk
    Jul 11, 2021 at 15:17
  • I want to seperate a replica instance from a staging instance.
    – merlin
    Jul 11, 2021 at 16:54
  • I thought that _multi was no longer supported and Docker was the preferred way?
    – Rick James
    Jul 14, 2021 at 21:04

1 Answer 1

1

Some advantages of using mysqld_multi:

  • You can start, stop, or restart all the instances with one command.
  • You can use one config file, keeping the config options common to all instances in a [mysqld] section, and only the instance-specific options in the instance section.

If you don't use mysqld_multi, you would need to create your own systemd entry for your second instance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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