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

Mysql session control limits the number of logins (connection_control plug-in)

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Database environment:

Server version: 5.6.41 MySQL Community Server (GPL)

1. View users

Mysql > select Host,User from user where User='jiangjj'

2. Install the plug-in

Installation method 1:

Mysql > Install plugin connection_control soname "connection_control.so"

Mysql > show plugins

Installation method 2:

# vim / etc/my.cnf

[mysqld]

# add the following parameters

Plugin-load=CONNECTION_CONTROL=connection_control.so

Connection_control_min_connection_delay=60000

Just restart it.

3. View the relevant configurations and make adjustments

The minimum delayed login time after 3 consecutive failures and exceeding the upper limit of failed connections is 1 minute.

Mysql > show variables like "connection_control%"

4. Test: if three login verifications fail, you will wait for 1 minute, as shown in the figure

5. Uninstall:

Mysql > uninstall plugin CONNECTION_CONTROL

6. Summary

The continuous failed login control takes effect, avoiding the possibility of a large number of illegal connections. In order to increase the safety factor, the minimum delay time can be increased.

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