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

前端 未结 8 1181
执念已碎
执念已碎 2020-12-29 13:07

when I tried to restore all database dump which is in 5.0 version to 5.6 version, it got restored and after that when I tried to reconnect, am getting the following error

8条回答
  •  旧巷少年郎
    2020-12-29 13:46

    I've got same problem in Centos 7 with MySQL. If i try to connect by mysql client:

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

    Bu in my case if I specify:

    --skip-secure-auth

    it cause error message:

    ERROR 1275 (HY000): Server is running in --secure-auth mode, but 'root'@'localhost' has a password in the old format; please change the password to the new format

    It work only when i specify:

    in /etc/my.cnf

    [mysqld]
    ...
    secure_auth=false
    

    and then restart mysqld

提交回复
热议问题