Linux

mysql 5.7 이상 암호 복잡성 해지하기

Naan 2017. 1. 23. 17:38
반응형

mysql 5.7 에서 암호를 변경을 하려 하면

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

라는 메세지가 뜬다. 보안강화로 암호를 복잡하게 안하면 변경이 안된다.


# mysql -u root -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 4

Server version: 5.7.17


Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'qqqq1111';

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '1q2W3e$r%T';

Query OK, 0 rows affected (0.00 sec)


mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)


mysql> quit

Bye



/usr/lib64/mysql/plugin/ 경로에 있는 validate_password.so을 삭제 하거나 이름을 변경해주면 된다.



# cd /usr/lib64/mysql/plugin/

# cd plugin/

# ls

adt_null.so            debug                 innodb_engine.so  libmemcached.so     mypluglib.so       rewrite_example.so  semisync_slave.so

auth_socket.so         group_replication.so  keyring_file.so   libpluginmecab.so   mysql_no_login.so  rewriter.so         validate_password.so

connection_control.so  ha_example.so         keyring_udf.so    locking_service.so  mysqlx.so          semisync_master.so  version_token.so

# mv validate_password.so validate_password.so1


# service mysqld restart

Stopping mysqld:                                           [  OK  ]

Starting mysqld:                                           [  OK  ]

# mysql -u root -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 5

Server version: 5.7.17 MySQL Community Server (GPL)


Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'qqqq1111';

Query OK, 0 rows affected (0.00 sec)


mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)



반응형