2016/12/07
DigitalOcean is awesome.
Here is how to build a MySQL server on DigitalOcean, using Ubuntu 16.04. It’s pretty easy, right?
$ sudo apt-get install mysql-server
$ sudo mysql_secure_installation
To allow network access, edit mysqld.cnf
file.
$ sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
Change this line
bind-address = 127.0.0.1
into
#bind-address = 127.0.0.1
https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands
$ sudo ufw allow from xxx.xxx.xxx.xxx to any port 3306
Check the setting.
$ sudo ufw status
$ sudo service mysql restart