關(guān)于做甜品的網(wǎng)站站長工具seo綜合查詢問題
目錄
?
一、限制登陸策略
1、Windows?
2、Linux
一、限制登陸策略
1、Windows?
1)安裝插件
登錄MySQL數(shù)據(jù)庫
mysql -u root -p
執(zhí)行命令安裝插件
#限制登陸失敗次數(shù)插件
install plugin CONNECTION_CONTROL soname 'connection_control.dll';install plugin CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS soname 'connection_control.dll';
2)設(shè)置策略
?1.臨時(shí)
在命令行執(zhí)行設(shè)置命令,臨時(shí),重啟數(shù)據(jù)庫后會(huì)重置
注:connection_control_max_connection_delay為限制重試最能到時(shí)間,這個(gè)一般不設(shè)置,如果要設(shè)置,按最小時(shí)間的格式加進(jìn)去就行。
connection-control-failed-connections-threshold=5
connection-control-min-connection-delay=300000 #登陸失敗次數(shù)限制
SET GLOBAL connection_control_failed_connections_threshold = 5;#限制重試最小時(shí)間,單位為毫秒,注意換算,這為5分鐘
SET GLOBAL connection_control_min_connection_delay = 300000;
2.永久
?在MYSQL配置文件my.ini中的 [mysqld] 下添加。
注:connection_control_max_connection_delay為限制重試最能到時(shí)間,這個(gè)一般不設(shè)置,如果要設(shè)置,按最小時(shí)間的格式加進(jìn)去就行。
#插件,登陸失敗處理
plugin-load-add = validate_password.dllplugin-load-add = connection_control.dll#登陸失敗次數(shù)限制
connection_control_failed_connections_threshold=5#限制重試最小時(shí)間,單位為毫秒,注意換算,這為5分鐘
connection_control_min_connection_delay=300000
配置好后重啟數(shù)據(jù)庫
net restart mysql
3)查看
登錄數(shù)據(jù)庫查看是否生效
mysql -u root -p
show variables like '%connection_control%';
2、Linux
1)安裝插件
登錄MySQL數(shù)據(jù)庫
mysql -u root -p
登錄后執(zhí)行命令安裝插件
#限制登陸失敗次數(shù)插件
install plugin CONNECTION_CONTROL soname 'connection_control.so';install plugin CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS soname 'connection_control.so';
2)設(shè)置策略
1.臨時(shí)
在命令行執(zhí)行設(shè)置命令,臨時(shí),重啟數(shù)據(jù)庫后會(huì)重置
?注:connection_control_max_connection_delay為限制重試最能到時(shí)間,這個(gè)一般不設(shè)置,如果要設(shè)置,按設(shè)置最小時(shí)間的格式加進(jìn)去就行。
connection-control-failed-connections-threshold=5
connection-control-min-connection-delay=300000 #登陸失敗次數(shù)限制
SET GLOBAL connection_control_failed_connections_threshold = 5;#限制重試最小時(shí)間,單位為毫秒,注意換算,這為5分鐘
SET GLOBAL connection_control_min_connection_delay = 300000;
2.永久
?在MYSQL配置文件my.cnf中的 [mysqld] 下添加。
注:connection_control_max_connection_delay為限制重試最能到時(shí)間,這個(gè)一般不設(shè)置,如果要設(shè)置,按設(shè)置最小時(shí)間的格式加進(jìn)去就行。
#插件,登陸失敗處理
plugin-load-add = validate_password.soplugin-load-add = connection_control.so#登陸失敗次數(shù)限制
connection_control_failed_connections_threshold=5#限制重試最小時(shí)間,單位為毫秒,注意換算,這為5分鐘
connection_control_min_connection_delay=300000
配置好后重啟數(shù)據(jù)庫
systemctl restart mysqld
3)查看
?登錄數(shù)據(jù)庫查看是否生效
mysql -u root -p
show variables like '%connection_control%';