Are you the one who use weak password like 'admin', '123456' sort of things? How to set up a password policy to prevent human factors caused by lack of the sense of data security from the very beginning? If you are using MySQL, this is the thing you shouldn’t miss.
You will learn:
For more information, please refer to the MySQL official documentation or you can also find the guidance on Alibaba Cloud.
https://dev.mysql.com/doc/refman/8.0/en/validate-password.html
https://www.alibabacloud.com/help/en/apsaradb-for-rds/latest/configure-a-custom-password-policy-for-an-apsaradb-rds-for-mysql-instance
Mysql 5.7
// weak password
create user test identified by 'admin';
Drop user test;
//check if validate_password is installed?
SELECT PLUGIN_NAME, PLUGIN_LIBRARY, PLUGIN_STATUS, LOAD_OPTION
FROM INFORMATION_SCHEMA.PLUGINS
WHERE PLUGIN_NAME = 'validate_password';
// install plugin
INSTALL PLUGIN validate_password SONAME 'validate_password.so';
// check status
select * from mysql.plugin;
SHOW GLOBAL VARIABLES LIKE 'validate_password%';
// test
create user test identified by '123456';
create user test identified by 'Passw@rd1';
drop user test;
//change variables
SET GLOBAL validate_password_policy=LOW;
//uninstall
UNINSTALL PLUGIN validate_password;
MySQL 8.0
// weak password
create user test identified by 'administrator';
Drop user test;
// check if installed?
SELECT * FROM mysql.component;
// install the component
INSTALL COMPONENT 'file://component_validate_password';
// see system variables
show variables like 'validate_password%';
SHOW STATUS LIKE 'validate_password%';
// test
create user test identified by '123456';
create user test identified by 'Passw@rd1';
drop user test;
// change the variables
SET GLOBAL validate_password_policy=STRONG;
// uninstall
UNINSTALL COMPONENT 'file://component_validate_password';
Database Security - How to Realize Data Masking in Data Management Service on Alibaba Cloud
Alibaba Cloud Community - January 5, 2024
Alibaba Cloud Community - January 15, 2024
Alibaba Cloud Community - December 4, 2023
Alibaba Clouder - November 15, 2019
Alibaba Cloud Community - December 4, 2023
francisndungu - May 29, 2019
Protect, backup, and restore your data assets on the cloud with Alibaba Cloud database services.
Learn MoreThis solution helps you easily build a robust data security framework to safeguard your data assets throughout the data security lifecycle with ensured confidentiality, integrity, and availability of your data.
Learn MoreAlibaba Cloud is committed to safeguarding the cloud security for every business.
Learn MoreAlibaba Cloud PolarDB for MySQL is a cloud-native relational database service 100% compatible with MySQL.
Learn MoreMore Posts by ApsaraDB