ubuntu mysql允許遠程連接
MySQL允許遠程訪問的設置
1.注釋bind-address = 127.0.0.1蝉揍。
代碼如下:
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
將bind-address = 127.0.0.1注釋掉
2.腥泥、支持root用戶允許遠程連接mysql數(shù)據(jù)庫
grant all privileges on . to 'root'@'%' identified by '123456' with grant option;
flush privileges;
然后重啟mysql