Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of MySQL restricting the range of IP Network Segment from remote access

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Mysql > grant select,insert,update,create on test.* to test@'192.168.8.%' identified by '123456'

Mysql > grant select,insert,update,create on test.* to test@'192.168.9.%' identified by '123456'

Mysql > grant select,insert,update,create on test.* to test@'192.168.20.%' identified by '123456'

The above statement authorizes all permissions of the test database to the test user, only allows the test user to log in remotely in the IP range of the three network segments 192.168.8 and 920, and sets the password of the test user to 123456

Refresh the permissions table to make its settings take effect:

Mysql > flush privileges

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report