mysql 远程访问 配置

sudo vi /etc/mysql/my.cnf

  找到bind-address = 127.0.0.1

  注释掉这行:#bind-address = 127.0.0.1

  或者改为: bind-address = 0.0.0.0 (允许任意IP访问)

  或者自己指定一个IP地址。

 

mysql -h localhost -uroot -p

  Grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘password‘ with grant option;

  flush privileges;

 

sudo /etc/init.d/mysql restart

mysql 远程访问 配置,布布扣,bubuko.com

mysql 远程访问 配置

上一篇:OCM_Session8_2_Step-by-Step Instructions for Creating a Physical Standby Database


下一篇:linux 怎么完全卸载mysql数据库