Install MySQL 5.6 on Ubuntu 20.04

不羁的心 提交于 2021-02-16 18:27:58

问题


I have a custom app that required MySql 5.6. I was able to install MySql 5.7 on ubuntu 20.04 using this tutorial: https://askubuntu.com/a/1232993

How can I install MySql 5.6 on ubuntu 20.04?

Because the above tutorial only works for MySql 5.7, and I didn't find any working solution online.

Can MySql 5.6 run on Ubuntu 20.04? Should I downgrade the OS to Ubuntu 18.04?


回答1:


To install mysql 5.6.48 in Ubuntu 20:

  1. Download mysql from here
  2. unzip the tar file and install
tar xvf mysql-server_5.6.48-1debian9_amd64.deb-bundle.tar

sudo dpkg -i *.deb
  1. it will ask you to create the root password for mysql. enter it
  2. start mysql server

sudo /etc/init.d/mysql start




回答2:


I managed to install MySql 5.6 on Ubuntu 20.04 using the steps from here:

1) I downloaded the last version of MySql 5.6 that is available for Debian (and Ubuntu also)

wget https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-server_5.6.48-1debian9_amd64.deb-bundle.tar

dpkg -i mysql-server_5.6.48-1debian9_amd64.deb-bundle.tar

mysql apt update

2) I followed the steps from here:

https://askubuntu.com/a/1030987

sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe'
sudo apt-get update
apt-get install mysql-common-5.6 mysql-client-5.6 mysql-server-5.6

3) In order to prevent MySql to upgrade to version 8, I followed these steps:

https://askubuntu.com/a/1209971

But I replaced the MySql version with:

5.6.48-1debian9



来源:https://stackoverflow.com/questions/62382968/install-mysql-5-6-on-ubuntu-20-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!