Tuesday, 4 October 2016

ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref used (client option 'secure_auth' enabled)

Issue:-

ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref used (client option 'secure_auth' enabled)..

Solution:-

On the command line, use below ....

mysql -uUSERNAME -pPASSWD DbName -h HostName --skip-secure-auth

OR

Login to mysql DB with root user.

show variables like 'old_passwords';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| old_passwords   | ON    |
|-----------------+-------+

old_passwords is ON is clearly the problem,
So temporarily changed it:


set session old_passwords = 'OFF';

show variables like 'old_passwords';

+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| old_passwords   | OFF   |
------------------+-------+

Created a new user:

create user 'username' IDENTIFIED BY 'passwd';

than try to connect DB.


No comments:

Post a Comment