使用ubuntu 22.04 手動安裝 MySQL 5.7

1、下載安裝檔:mysql-server_5.7.31-1ubuntu18.04_amd64.deb-bundle.tar

歷史版本下載地址:https://downloads.mysql.com/archives/community/

2、解壓縮安裝檔

#tar zxvf mysql-server_5.7.31-1ubuntu18.04_amd64.deb-bundle.tar

3、先安裝相依性套件

#apt-get update
#apt-get upgrade

#apt-get install ./libmysql*
#apt-get install libtinfo5

4、安裝client 與 Server

#apt-get install ./mysql-community-client_5.7.31-1ubuntu18.04_amd64.deb
#apt-get install ./mysql-client_5.7.31-1ubuntu18.04_amd64.deb
#apt-get install ./mysql-community-server_5.7.31-1ubuntu18.04_amd64.deb
#apt-get install ./mysql-server_5.7.31-1ubuntu18.04_amd64.deb 

安裝Server的過程中, 會請你輸入MySQL Server的管理者(root)密碼

5、安裝完畢後可用以下指令檢查

systemctl status mysql.service
systemctl start  mysql.service
systemctl stop   mysql.service