安装 sudo apt-get install mysql-client mysql-server
/etc/mysql/mysql.conf.d/mysqld.cnf VI
the bind off 127 Notemysql.user 授权
update mysql.user set host = ‘%’ where username = ‘root’Allow firewall ports
sudo ufw allow 3306/tcp
sudo ufw allow 3306
sudo ufw allow 8080/tcp
sudo ufw allow 8080
sudo service ufw restartWhether cloud hosting or docker External exposure
sudo service mysql restart
sudo netstat -tap | grep mysql