当前位置:网站首页>连接局域网MySql
连接局域网MySql
2022-07-06 09:33:00 【小白说(๑• . •๑)】
连接局域网MySql
今天遇见一个小问题,记录一下。
描述:不同的主机连接局域网内某台主机的MySql数据库。
防火墙设置
因为安全的问题,不能直接关闭防火墙,所以需要设置一下入站规则。
打开:网络和Internet设置->windows防火墙->高级设置。
启用两个规则,属性设置为任意IP地址,局域网内能ping通MySql所在主机IP:
创建一个新的入站规则:可以对任何局域网内任意IP开放一个3306的端口(我使用的mysql服务的端口)。按照顺序操作。
至此,局域网的端口开放就已经完成了。
MySql服务设置
因为MySql默认只支持localhost进行本地访问,本地的IP都不可以访问,所以需要开放一下MySql权限。
- 使用客户端连接到本地MySql服务,打开mysql数据库;(use mysql)
- 查询一下权限对应的IP:SELECT user,host FROM user;
- 找到需要开放权限(用户)的访问IP进行更新(%):update user set host=’%’ where user=‘登录用户root’
- 重启MySql服务或者刷新权限:FLUSH PRIVILEGES
现在就能访问到局域网内的MySql数据库了!
边栏推荐
- Yao BanZhi and his team came together, and the competition experts gathered together. What fairy programming competition is this?
- SQL调优小记
- MySQL数字函数
- 8086 CPU internal structure
- Flink源码解读(一):StreamGraph源码解读
- Idea resolving jar package conflicts
- Flink parsing (VI): savepoints
- The "advertising maniacs" in this group of programmers turned Tiktok advertisements into ar games
- Interpretation of Flink source code (III): Interpretation of executiongraph source code
- TCP's three handshakes and four waves
猜你喜欢

JVM之垃圾回收器下篇

When it comes to Google i/o, this is how ByteDance is applied to flutter

ByteDance open source Gan model compression framework, saving up to 97.8% of computing power - iccv 2021

原型链继承

Fdog series (I): think about it. It's better to write a chat software. Then start with the imitation QQ registration page.

谢邀,人在工区,刚交代码,在下字节跳动实习生

Shell_ 02_ Text three swordsman

汇编课后作业

ByteDance overseas technical team won the championship again: HD video coding has won the first place in 17 items

JVM类加载子系统
随机推荐
Assembly language addressing mode
"One year after graduation, I won ACL best paper"
Interpretation of Flink source code (III): Interpretation of executiongraph source code
Alibaba cloud server builds SVN version Library
Conception du système de thermomètre numérique DS18B20
控制转移指令
Shell_ 04_ Shell script
Design of DS18B20 digital thermometer system
Fdog series (III): use Tencent cloud SMS interface to send SMS, write database, deploy to server, web finale.
Fdog series (V): use QT to imitate QQ to realize login interface to main interface, function chapter.
Description of project structure configuration of idea
Some feelings of brushing leetcode 300+ questions
Activiti目录(四)查询代办/已办、审核
Flink 解析(一):基础概念解析
JVM类加载子系统
面试集锦库
關於Stream和Map的巧用
arithmetic operation
MySQL optimization notes
Programmer orientation problem solving methodology