I need to install 3 different versions of mysql-server in a single instance(Ubuntu). 1. MySQL server 5.6.24 2. MySQL server 5.6.32 3. MySQL server 5.7 latest release
Can anyone tell me the process to install all the above versions.
1 Answer
I can't see how to do so using the traditional apt setup so I found this solution which uses docker to install as many versions of mysql on your ubuntu instance:
Steps:
Install default mysql using apt:
sudo apt install sudo apt-get install mysql-server-5.7 mysql-server-core-5.7 mysql-client-5.7 mysql-client-core-5.7The install docker:
curl -sSL | shInstall the version of
mysqlyou want and assign it to a different port:sudo docker run --name mysql-56-container -p 127.0.0.1:3310:3306 -e MYSQL_ROOT_PASSWORD=rootpassword -d mysql:5.6127.0.0.1:3310:3306forwards port3306on docker to port3310on host
Now you have both mysql 5.7, and 5.6 connection can be made like thus:
To docker image:
mysql -u root -p --host=127.0.0.1 --port=3310To host mysql:
mysql -u root -p
Please note I used fictitious mysql instances your will vary.
Further information: