xiaoysh8
7/31/2017 - 2:57 AM

mysql remote access

mysql remote access


1 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
 FLUSH PRIVILEGES;

Out of the box, MySQL will only allow access from the localhost address 127.0.0.1. To change this, you need to open the /etc/mysql/mysql.conf.d/mysqld.cnf file and change the line:

2 bind-address = 127.0.0.1

 to

 #bind-address = 127.0.0.1