Ubuntu Setup Open MySQL Service Remote Access Tutorial

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.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326443291&siteId=291194637