• When using the Ubuntu system of Aliyun server to connect to the remote database, sometimes the database cannot get the link.

  • I tried many solutions to this problem, but I found a solution in an article about using virtual machine databases incorrectly.
  1. First enter commands vim/etc/mysql/mysql. Conf. D/mysqld. CNF

  2. Comment #bind-addres = 127.0.0.1 in mysqld. CNF configuration file

  3. After the modification, run the mysql -h public IP address -u user -p command to connect the remote server to mysql

This resolves the SQL :database is Closed problem