How to install mysql 5.7 (linux)

Copy the key here to your clipboard

https://dev.mysql.com/doc/refman/5.7/en/checking-gpg-signature.html        

Save it in a file on your machine i.e. signature.key and then

sudo apt-key add signature.key        

add the apt repo

sudo sh -c 'echo "deb https://repo.mysql.com/apt/ubuntu bionic mysql-5.7" >> /etc/apt/sources.list.d/mysql.list'        

update apt

sudo apt-get update        

now check your available versions:

sudo apt-cache policy mysql-server 

vagrant@ubuntu-focal:/vagrant$ sudo apt-cache policy mysql-server
mysql-server:
  Installed: (none)
  Candidate: 8.0.27-0ubuntu0.20.04.1
  Version table:
     8.0.27-0ubuntu0.20.04.1 500
        500 https://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 https://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     8.0.19-0ubuntu5 500
        500 https://archive.ubuntu.com/ubuntu focal/main amd64 Packages
     5.7.37-1ubuntu18.04 500
        500 https://repo.mysql.com/apt/ubuntu bionic/mysql-5.7 amd64 Packages
        

Now install mysql 5.7

sudo apt install -f mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7*        


要查看或添加评论,请登录

Tosin Adewale的更多文章

社区洞察

其他会员也浏览了