# download the configuration wget https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb sudo dpkg -i mysql-apt-config_0.8.14-1_all.deb # default is fine, select OK and return
sudo apt update sudo apt-get install mysql-server # set password(spa2020) # use strong password encryption
sudo mysql_secure_installation # enter password # n (不换root密码) # Remove anonymous users? : y(删除匿名用户) # Disallow root login remotely?: n(是否禁止 root 远程登录) # Remove test database and access to it? : y(删除测试数据库) # Reload privilege tables now? : y(立即重新加载特权表)
mysql -V # check version # mysql Ver 8.0.19 for Linux on x86_64 (MySQL Community Server - GPL)