여러가지/DBMS

[MariaDB] --strict-password-validation

15June 2024. 4. 25. 11:59

> SET PASSWORD FOR 'username'@'hostname' = PASSWORD('new_password');

----- < ERROR > --------------------------------------------------------------------------------------------------------------------------------

The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement.

------------------------------------------------------------------------------------------------------------------------------------------------------

 

Step 1. root 계정 접속

> SET GLOBAL strict_password_validation = OFF ;

 

Step 2. 작업(safeusr) 계정 접속

> SET PASSWORD FOR 'username'@'hostname' = PASSWORD('new_password');

 

Step 3. root 계정 접속

> SET GLOBAL strict_password_validation = ON ;

 

 

 

> SET PASSWORD FOR 'username'@'hostname' = 'new_password';

----- < ERROR > --------------------------------------------------------------------------------------------------------------------------------

 Password hash should be a 41-digit hexadecimal number

------------------------------------------------------------------------------------------------------------------------------------------------------

위와 같은 형식으로 입력하면 에러 발생한다. 따라서 아래와 같은 형식으로 입력한다.

> SET PASSWORD FOR 'username'@'hostname' = PASSWORD('new_password');