惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
爱范儿
爱范儿
小众软件
小众软件
MyScale Blog
MyScale Blog
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
V
V2EX
量子位
云风的 BLOG
云风的 BLOG
A
About on SuperTechFans
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
C
Check Point Blog
月光博客
月光博客

博客园 - 番茄的梦想

Debian防火墙的ufw的使用 Linux—nvm教程 linux service文件格式 linux if命令 微软sdk及运行时下载地址 解决python错误 UnicodeDecodeError: 'gb2312' codec can't decode byte 0x8b in position 1: illegal multibyt pip相关介绍 结构(位置)伪类选择器 如何清除mstsc记录 ubuntu开启远程桌面功能 使用Windows远程桌面工具来远程连接控制Ubuntu系统 缓存头Cache-Control的含义和使用 正则表达式 以A开头B结尾 取中间的内容 nginx 不带www的域名跳转www域名 IIS配置导入导出 CSS中hover选择器的使用详解 html 锚点三种实现方法 重置自增长id 如何解决Visual Studio2012 与此版本的Windows不兼容
LNMP一键安装包安装的mysql远程连接不上的问题
番茄的梦想 · 2023-11-20 · via 博客园 - 番茄的梦想

正常的做法: 

  以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

  然后远程连接, 成功连接