How to Install MySQL 5.7 on Ubuntu 20.04 LTS

Samsul Hoque
6
MySQL server 5.7 isn't available in the repositories of Ubuntu 20.04 LTS but is available in Bionic Beaver (18.04) from Ubuntu's official repostories as well as MySQL's. You can install MySQL Server 5.7 on  using Bionic's repository.

To use MySQL's repository for Ubuntu 18.04
  • First of all create a new text file with sudo privileges:
sudo nano /etc/apt/sources.list.d/mysql.list

  • Add these lines:
deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-apt-configdeb http://repo.mysql.com/apt/ubuntu/ bionic mysql-5.7deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-toolsdeb-src http://repo.mysql.com/apt/ubuntu/ bionic mysql-5.7
  • Pin the version of mysql-client and mysql-server to 5.7*. For this create the file /etc/apt/preferences.d/mysql with content
sudo nano /etc/apt/preferences.d/mysql

  • Add these lines:
Package: mysql-server
Pin: version 5.7*
Pin-Priority: 1001

Package: mysql-client
Pin: version 5.7*
Pin-Priority: 1001

Package: mysql-community-server
Pin: version 5.7*
Pin-Priority: 1001

Package: mysql-community-client
Pin: version 5.7*
Pin-Priority: 1001

Update repo and install
sudo apt update
sudo apt install mysql-client mysql-server

Ref:https://askubuntu.com/questions/1199495/is-it-possible-to-install-mysql-server-5-7-on-ubuntu-19-10 

Post a Comment

6Comments
  1. great article!! sharing these type of articles is the nice one and i hope you will share an article on data science.By giving a institute like 360DigiTMG.it is one the best institute for doing certified courses
    data science course

    ReplyDelete
  2. Great blog!! I hope you're going to post an artificial intelligence blog.
    artificial intelligence course in noida

    ReplyDelete

  3. Hello there to everyone, here everybody is sharing such information, so it's fussy to see this webpage, and I used to visit this blog day by day
    hrdf claimable training

    ReplyDelete
  4. Wonderful blog post. This is absolute magic from you! I have never seen a more wonderful post than this one. You've really made my day today with this. I hope you keep this up!
    business analytics course

    ReplyDelete
  5. I'm glad to see the extensive unpretentious component here!.
    what is hrdf claimable

    ReplyDelete
  6. This is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your posts, I guess I am not the only one having all the enjoyment here! Keep up the excellent work. web development in pakistan

    ReplyDelete
Post a Comment