sudo apt-get install mysql-server 一直報錯,按照下面的終于安裝出來了
這個鏈接========================= https://cn.linux-console.net/?p=13784?
第 1 步:要刪除 MySQL 及其所有依賴項,請執行以下命令: sudo apt-get remove --purge mysql*?
第 2 步:要刪除 MySQL 及其所有依賴項,請執行以下命令: sudo apt-get purge mysql*?
第 3 步:要刪除 MySQL 和剩余文件,請執行以下命令: sudo apt-get autoremove?
第 4 步:要清除本地存儲庫,請執行以下命令: sudo apt-get autoclean
第 5 步:要清除安裝期間創建的數據庫,請執行以下命令: sudo apt-get remove dbconfig-mysql?
第6步:
官網下安裝包 https://dev.mysql.com/downloads/mysql/5.7.html? #downloads?
mysql-server_8.0.41-1ubuntu20.04_amd64.deb-bundle.tar?
第 7 步: 解壓到一個文件夾,然后在此文件夾
sudo dpkg -i *.deb?
還是報錯缺少8.0sever?
sudo apt-get install -f 終于出來 輸入root密碼了?
第8步:執行以下命令轉到根目錄: sudo su?
sudo apt-get update
sudo apt-get install mysql-server?
sudo apt-get update?
sudo apt-get install mysql-client libmysqlclient21
第9步:現在通過運行下面提到的命令來配置MySQL,然后在執行后按回車鍵: dpkg-reconfigure mysql-apt-config?
【Processing triggers for libc-bin (2.31-0ubuntu9.17) ... a@1:~/Downloads/1111$ sudo su sudo apt-get update sudo apt-get install mysql-server sudo apt-get update sudo apt-get install mysql-client libmysqlclient21 root@1:/home/a/Downloads/1111# dpkg-reconfigure mysql-apt-config dpkg-query: package 'mysql-apt-config' is not installed and no information is available Use dpkg --info (= dpkg-deb --info) to examine archive files. /usr/sbin/dpkg-reconfigure: mysql-apt-config is not installed. root@1:/home/a/Downloads/1111# 】
第 10 步: sudo apt-get update?
sudo apt-get install mysql-server?
sudo service mysql status?
要檢查剛剛安裝的 mysql 版本,請運行以下命令: mysql -V
?