当前位置:网站首页>MySQL -- how to access the database of a computer in the same LAN (prenatal education level teaching)
MySQL -- how to access the database of a computer in the same LAN (prenatal education level teaching)
2022-06-23 01:33:00 【July stars】
Be careful : Method 1 、 Both operations are performed on the computer sharing the database
Method 1 、 be based on MySQL 5.5 Command Line Client Window
More direct than method two , But it is also possible that you did not choose to install this when installing , If installed , Just use method 1 , Use method 2 without installation .
One 、 Double-click on the run MySQL 5.5 Command Line Client.
Two 、 Input mysql Database password ,enter determine .
3、 ... and 、 Input grant all privileges on *.* to [email protected]'%' identified by"root"; Back carriage return .
The purpose is to set up all in the LAN ip Can access this computer .
allprivileges Is all permissions , After the connection is completed, all permissions of the local database can be accessed by others .
% All users , If you change it to a certain ip It gives this person access to the local database .
Pay attention to make sure that ; Band No !
Four 、 Step 4 enter , Show Query OK Indicates the operation is successful . Then you need to refresh the database , Input :flush privileges; Back carriage return , Note that you should also bring ;
6、 ... and 、 Find... In the control panel “Window Defender A firewall ” And open 

7、 ... and 、 Choose advanced settings 
7、 ... and 、 Select the inbound rule and click new rule 
8、 ... and 、 Select the port and click next 
Nine 、 Figure position input 80,3306 Click next all the time , The following names are for the convenience of distinguishing , Can write mysql Stack rules 
Method 2 、 be based on cmd Black window

One 、 function cmd, Input mysql -u root -p
Two 、 Input mysql Database password ,enter determine .
3、 ... and 、 At this point, follow step 3 of method 1 and continue to finish
How other computers connect to this database
With Navicat for MySQL As an example 
make new connection 
Operate as shown in the figure 
Be careful :
1、3306 Is the default port number , As you set up above mysql Is related to the stack rules of .
2、 It's not just Navicat for MySQL, In other places, just put localhost Replace with the other party's IP Address That's all right.
Add :
How to check the computer IP Address :
1、 open cmd( Or command prompt )
2、 Input ipconfig/all
边栏推荐
- Const defined variables and for of and for in in JS
- E-R diagram
- Is it safe for Hongyuan futures to open an account? Can Hongyuan futures company reduce the handling fee?
- [cmake command notes]target_ compile_ options
- Autumn move script a
- 人民币的单位的大写
- three. JS simulated driving tour art exhibition hall - creating super camera controller
- Openvino CPU acceleration survey
- SFOD:无源域适配升级优化,让检测模型更容易适应新数据
- Vscade personalization: let a cute girl knock the code with you
猜你喜欢

Installation record of ros1noetic in Win 11

Template specialization template <>

New progress in the construction of meituan's Flink based real-time data warehouse platform

Webdriver and selenium Usage Summary

LeetCode 206. 反转链表(迭代+递归)

OSPF comprehensive experiment

Wallys/DR7915-wifi6-MT7915-MT7975-2T2R-support-OpenWRT-802.11AX-supporting-MiniPCIe

Development status of full color LED display

Do you know the memory components of MySQL InnoDB?

Autumn move script C
随机推荐
[hdu] P6964 I love counting
C language student achievement ranking system
How about precious metal spot silver?
Binary String
Debian10 LVM logical volumes
Js--- SVG to png
Pat class A - 1012 the best rank (PIT)
three. JS simulated driving tour art exhibition hall - creating super camera controller
Add / get and delete cookies
Time complexity
SAP ui5 application development tutorial 103 - how to consume third-party libraries in SAP ui5 applications
Get the start and end dates of the current week
Extend your kubernetes API using the aggregation API
使用aggregation API扩展你的kubernetes API
[hdu] p7058 ink on paper finding the maximum edge of the minimum spanning tree
Pat a - 1010 radical (thinking + two points)
Network module packaging
Ansible learning summary (8) -- Summary of ansible control right raising related knowledge
3D printing microstructure
Using WordPress to create a MySQL based education website (learning notes 2) (technical notes 1) xampp error1045 solution