1

On my Ubuntu 18.04, I need to run both versions of MySQL - 5.7 and 8.0, simultaneously. I use a single machine for both personal and professional projects, and at work, all apps use 5.7, while all my stuff uses 8.0.

What is my simplest option? As far as I googled, it seems that I might install one version via the package manager and then build another one from source and configure it so it does not conflict with the first one.

Research got me to 4.3.4 mysqld_multi — Manage Multiple MySQL Servers and as far as I like the idea of how it works (creating the multi_admin user in both databases responsible for launching servers), I am not sure how to approach with the second instance installation. I would love to avoid building the whole thing from source, as I have very little experience in doing so.

The ideal scenario is to just have them both running and not to think about too much, so I can focus on coding.

Is there any way to overwrite the package default configuration while installing it via apt or building from os-dedicated binary?

How do I best approach the problem, given my little-to-no experience in building from source?

2

1 Answer 1

6

Use Docker or virtual machines. That's what I would do. If you install both servers on your machine it might work, sure. But chances are there will be an interference at one point: either this won't work from the beginning and you'll waste time fixing it or, worse, it will work but have bugs in some conditions - even bigger waste of time. Cleanest and safest sollution would be to mimic having the servers on sepparate machines, like i said...

1
  • 1
    Anyway thanks man. Docker really did help me. I hate docker at first, because on windows docker is really a hog, but on Linux server, it's a breeze. Thank you for reminding me. :) At least I don't do something dumb dumb Dec 29, 2020 at 8:57

Your Answer

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

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