kuiba

正常的做法: 

  以root用户登录mysql:

    grant all privileges on *.* to 创建的用户名@"%" identified by "密码";

    flush privileges;

  例如:     

    mysql>grant all privileges on *.* to zhangsan@"%" identified by "123456";

    mysql>flush privileges;

  这里就是允许zhangsan用户远程登录, 密码是123456

 

但是使用后发现还是远程连接不上,  原因是为了安全, lnmp禁止远程连接

  查看已有iptables规则, 用序号显示

  iptables -L -n --line-numbers

  

  删除对应的drop规则

  iptables -D INPUT 6

  然后远程连接, 成功连接  

 

 


分类:

技术点:

相关文章:

  • 2021-12-01
  • 2021-04-12
  • 2021-11-18
  • 2021-07-07
  • 2021-10-20
  • 2021-05-23
  • 2021-11-27
  • 2021-12-10
猜你喜欢
  • 2021-11-25
  • 2021-11-17
  • 2021-04-01
  • 2021-06-07
  • 2021-04-14
  • 2021-09-23
相关资源
相似解决方案