sunscheung

mysql如何开启对外连接?


1.修改Mysql配置文件 /etc/mysql/my.cnf

注释掉 bind-address = 127.0.0.1
vi /etc/hosts.allow
添加:Mysqld: ALL

2.重启Mysql sudo /etc/init.d/mysql restart

3.root登录用户赋予权限
mysql -uroot -ppassword
GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'%\' IDENTIFIED BY \'yxserver\' WITH GRANT OPTION;
FLUSH PRIVILEGES;

GRANT Create view,Show view, index, create temporary tables ON *.* TO \'waf\'@\'127.0.0.1\' IDENTIFIED BY \'yxserver\';

分类:

技术点:

相关文章:

  • 2021-12-18
  • 2023-03-21
  • 2021-11-24
  • 2021-11-28
  • 2021-11-28
  • 2022-02-08
  • 2021-12-08
  • 2022-01-05
猜你喜欢
  • 2021-11-28
  • 2021-04-22
  • 2022-01-07
  • 2022-12-23
相关资源
相似解决方案