이제는 5.7부터는 secure-auth 옵션을 mysql에 사용할 수 없다.


mysql에서는 4.1이전의 암호화 방법이 있었다. 대부분 이 방식을 많은 mysql 언어별 라이브러리에서 사용하고 있었다. mysql을 사용하는 애플리케이션의 구버전을 migration할 때 이 부분을 주의할 필요가 있다.


mysql 5.7을 설치하고 python 구(old) sqlalchemy에서 mysql에 접근하면 아래와 같은 에러가 발생한다. 


InternalError: (InternalError) (1251, u'Client does not support authentication protocol requested by server; consider upgrading MySQL client') None None




--skip-secure-auth, --secure-auth=0을 사용하면 secure-auth를 0으로 설정하지 못한다는 에러가 발생하고 mysqld이 실행되지 않는다. 


https://dev.mysql.com/doc/refman/5.7/en/mysql-command-options.html#option_mysql_secure-auth


--secure-auth


Do not send passwords to the server in old (pre-4.1) format. This prevents connections except for servers that use the newer password format.


As of MySQL 5.7.5, this option is deprecated and will be removed in a future MySQL release. It is always enabled and attempting to disable it (--skip-secure-auth, --secure-auth=0) produces an error. Before MySQL 5.7.5, this option is enabled by default but can be disabled.







Posted by '김용환'
,