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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
H
Help Net Security
V
Visual Studio Blog
J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
MyScale Blog
MyScale Blog
The Cloudflare Blog
Martin Fowler
Martin Fowler
D
Docker
腾讯CDC
F
Fortinet All Blogs
雷峰网
雷峰网
GbyAI
GbyAI
G
Google Developers Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Announcements
Recent Announcements
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Blog — PlanetScale
Blog — PlanetScale
Engineering at Meta
Engineering at Meta
博客园 - 聂微东
博客园 - 叶小钗

博客园 - 番茄的梦想

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

  然后远程连接, 成功连接