ubuntu16.04卸载mysql5.7安装mysql5.6
程序员文章站
2022-05-26 23:43:27
...
1. 删除mysql
a. sudo apt-get autoremove --purge mysql-server-5.0 b. sudo apt-get remove mysql-server c. sudo apt-get autoremove mysql-server d. sudo apt-get remove mysql-common (非常重要)
2. 清理残留数据
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
如果报如下错误,证明你的系统中没有残留配置文件了,无须担心。
--------------------------------------------------------------------------------
dpkg: --purge needs at least one package name argument
Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].
Options marked [*] produce a lot of output - pipe it through `less' or `more' !
下面安装mysql5.6
你必须先删除这些文件夹:/etc/mysql/
/var/lib/mysql
/var/log/mysql
/var/lib/mysql-filters
/var/lib/mysql-keyring
和这个文件:/var/lib/mysql/debian-5.7.flag
- T0m3kk 7月22日在12:41
sudo apt-get install software-properties-common
$ sudo add-apt-repository -y ppa:ondrej/mysql-5.6
$ sudo apt-get update
$ sudo apt-get install mysql-server-5.6
推荐阅读
-
CentOS7.x卸载与安装MySQL5.7的操作过程以及编码格式的修改
-
MySQL5.6与MySQL5.7安装的区别
-
Docker 技术系列之安装多版本Mysql5.6和Mysql5.7
-
CentOS卸载完全删除后手工安装的mysql5.7的步骤
-
Mysql5.7解压版的安装和卸载及常见问题小结
-
Linux安装和卸载MySQL5.7
-
ubuntu16.04安装/卸载+ROS配置+搜狗输入法安装+pycharm安装+chrom+显卡驱动切换
-
Ubuntu16 卸载 安装mysql5.7
-
ubuntu16.04卸载和安装CUDA以及CUDNN
-
ubuntu16.04卸载mysql5.7安装mysql5.6