ubuntu20.04 安装MySQL5.7.35

ubuntu 20.04 安装mysql 5.7

说明

ubuntu 默认是安装mysql 8.x的版本。如果要安装5.7的,可以使用离线安装的方式。

  1. 下载mysql

https://dev.mysql.com/downloads/mysql/5.7.html 选择ubuntu18的64位的tar包

	wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-server_5.7.35-1ubuntu18.04_amd64.deb-bundle.tar
	----*----解压文件
	tar -xvf mysql-server_5.7.35-1ubuntu18.04_amd64.deb-bundle.tar

mysql-server_5.7.35-1ubuntu18.04_amd64.deb-bundle.tar*

  1. 安装

    解压后,按如下顺序安装,可能会遇到额外依赖。按如下方法安装即可

     dpkg -i mysql-common_5.7.35-1ubuntu18.04_amd64.deb
     dpkg -i libmysqlclient20_5.7.35-1ubuntu18.04_amd64.deb
     dpkg -i libmysqlclient-dev_5.7.35-1ubuntu18.04_amd64.deb
     dpkg -i libmysqld-dev_5.7.35-1ubuntu18.04_amd64.deb
     dpkg -i libmysqlclient20_5.7.35-1ubuntu18.04_amd64.deb
     如果安装失败,出现需要依赖的情况  会自动安装依赖
     apt --fix-broken install
     dpkg -i mysql-community-client_5.7.35-1ubuntu18.04_

你可能感兴趣的:(ubuntu20.04 安装MySQL5.7.35)