sudo apt install mysql-server mysql-client
sudo mysql_secure_installation
sudo mysql -uroot -plxgzhw
use mysql;
GRANT ALL PRIVILEGES ON *.* TO lxgzhw@'%' IDENTIFIED BY "lxgzhw";
exit
mysql -ulxgzhw -plxgzhw
create database flask_001 charset=utf8;
sudo vim /etc/mysql/mysql.conf.d/mysql.cnf
将bind-address注释掉,就可以远程登录了