下载apt包
https://dev.mysql.com/downloads/repo/apt/

安装
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
#选择 OK
sudo apt update

安装mysql8
sudo apt install mysql-server
输入密码
密码加密方式选择5.x
Use Legacy Authentication Method (Retain MySQL 5.x Compatibility) 

登录
mysql -u root -p
use mysql
-- 修改host为%
UPDATE `mysql`.`user` SET `Host` = '%' WHERE `User` = 'root';
flush privileges;

-- 查看默认字符集(utf8mb4)
show variables like '%char%';