1.下载mysql8
MySQL :: Download MySQL Installer (Archived Versions)
选择对应的mysql版本和对应的ubuntu版本图即可
2.下载后上传到sftp文件夹中,然后通过以下命令解压
tar -xvf mysql-server_8.0.29-1ubuntu20.04_amd64.deb-bundle.tar
3.依次安装即可 ,碰到以下问题
dpkg -i mysql-community-client-plugins_8.0.29-1ubuntu20.04_amd64.deb
dpkg -i mysql-community-client-core_8.0.29-1ubuntu20.04_amd64.deb
dpkg -i mysql-common_8.0.29-1ubuntu20.04_amd64.deb
dpkg -i mysql-community-client_8.0.29-1ubuntu20.04_amd64.deb
dpkg -i libmysqlclient21_8.0.29-1ubuntu20.04_amd64.deb
dpkg -i libmysqlclient-dev_8.0.29-1ubuntu20.04_amd64.deb
dpkg -i mysql-client_8.0.29-1ubuntu20.04_amd64.deb
dpkg -i libmecab2_0.996-10build1_amd64.deb #依赖包
dpkg -i mysql-community-server-core_8.0.29-1ubuntu20.04_amd64.deb
dpkg -i mysql-community-server_8.0.29-1ubuntu20.04_amd64.deb
dpkg -i mysql-server_8.0.29-1ubuntu20.04_amd64.deb
4.根据划红线的问题 ,依次安装即可
5.如果碰到缺少libtinfo2 ,去以下地址下载即可
http://archive.ubuntu.com/ubuntu/pool/universe/m/mecab/libmecab2_0.996-1.2ubuntu1_amd64.deb