Ubuntu set to open MySQL service remote access
The first step is to modify the configuration file:
vim /etc/mysql/my.cnf
turn up
bind-address = 127.0.0.1
Change it to:
bind-address = 0.0.0.0 #Allow
any ip address to access
An IP address can also be specified.
Restart MySQL:
sudo /etc/init.d/mysqld restart
The second step is to modify the database configuration:
Authorize root user to connect remotely
grant all privileges on *.* to root@"%" identified by "password_12345678" with grant option;
flush privileges;
The second line of commands makes the settings take effect.