下载文件:https://blog.csdn.net/wap816/article/details/107460974
安装:http://www.chaona.net/linux/ubuntu-install-mysql.html
参考:https://www.jianshu.com/p/ba48f1e386f0
无法下载的话可以在csdn下载(需要5积分):https://download.csdn.net/download/zwx_lucky/13120250
依次安装
sudo dpkg -i
libmecab2_0.996-10build1_amd64.deb
libtinfo5_6.2-0ubuntu2_amd64.deb
mysql-common_5.7.30-1ubuntu18.04_amd64.deb
mysql-community-client_5.7.30-1ubuntu16.04_amd64.deb
mysql-client_5.7.30-1ubuntu16.04_amd64.deb
mysql-community-server_5.7.30-1ubuntu16.04_amd64.deb
设置外网可连接:
登录mysql
use mysql;
update user set host='%' where user = 'root' limit 1;
quit;
重启:sudo service mysql restart
配置文件位置:etc/mysql/mysql.conf.d
卸载8.0:https://www.cnblogs.com/zhangxuel1ang/p/13456116.html
卸载5.7:
查看安装了哪些:dpkg --list|grep mysql
卸载:
sudo apt-get autoremove --purge mysql-community-server
sudo apt-get autoremove --purge mysql-community-client
sudo apt-get remove mysql-common
清除残留数据: dpkg -l|grep ^rc|awk '{print$2}'|sudo xargs dpkg -P