Score:1

Install a package/service under a different name

cn flag

I want to install a specific old version of MySQL, but I also want to keep my 'current' MySQL from APT.

I've downloaded the .deb file for the old version from the MySQL archive. My understanding is that I can install it with the following:

sudo apt install ./mysql-5.6.10-debian6.0-x86_64.deb

I understand that this will expose the mysql client command by placing it into /usr/bin or similar, and expose the mysql server service by adding mysql.service to /lib/systemd/system.

However, my 'current' MySQL client/server is there already, and I don't want to lose it.

How can I install this package such that the shell command and service have different names? E.g. in this case mysql-5.6.10?

user535733 avatar
cn flag
Using a deb, you cannot. You must install to a different location using a different kind of package (Snap, AppImage, Flatpak) or by installing from source. If the need for the older version is temporary, consider spinning up a container or virtual machine instead.
Nate T avatar
it flag
apt source will do it. download the bins in .deb format.you may not be able to load both into dpkg at once, but the make comes inside the debian folder. Your problem will be running twin daemons fighting for the exact same resources. I would run one in a container. That way you get a seperate dpkg as well. 2 birds and all that.. Otherwise you will end up spending forever and ultimately making sacrifices to get them running together. gimme a min and Ill answer with a bit more detail.
Score:2
in flag

There are a couple of things you will need to do:

  1. Stop. Go no further.
  2. Decide whether you would rather work with a virtual machine or a Docker container

If you try to install a second version of MySQL on a system that already has a working version — and one that you've said you don't want to lose — then your safest option is to have the second version operate independent of the first.

Reasons:

  • both versions of MySQL will want to use the same directories
  • both versions of MySQL will want to use the same ports
  • both versions of MySQL will want to use the same service names

Each of these items can be overcome, but it's not for the faint of heart.

So, with this in mind, if you want to run a Debian-specific installation of MySQL 5.6.10, you will want to decide between a VM or a Docker container. Looking through the available pre-built Docker containers, though, there is no 5.6.10 available to use, meaning you'd have to build one yourself. Depending on your familiarity with Docker and its myriad of tools, you may just want to stick with a VM.

Nate T avatar
it flag
He / she will likely have to. They would both just continuosly be overwriting each others files, blocking each other from ports, etc. Someof it could be worked out via config, but youd likely need rewrite a good chunk of the codebase to get it to work properly. Other wise, if they did get both to launch, the swap would be full & the machine frozen within the hour. : )
Nate T avatar
it flag
I hereby dub this one "The Case of the Evil Twins."
snazzybouche avatar
cn flag
Agh! The dreaded Docker. You can only avoid it for so long, I suppose. Thanks for your advice! Accurse these evil twins
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.