Security group under the cloud server, open port 3306
Alibaba Cloud has a quick definition, just select the Mysql port directly. 3306 is the default port of Mysql
Add a remote access account Root
mysql> use mysql; mysql> GRANT ALL ON *.* TO 账户@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
Configure mysql
vi /etc/mysql/mysql.conf.d/mysqld.cnf
Unregister bind-address = 127.0.0.1
Replace with 0.0.0.0
Modify bind-address = 127.0.0.1 to bind-address = 0.0.0.0 : wq --save and exit
sudo service mysql restart;