Client does not support authentication protocol requested by server; consider upgrading MySQL cli...

环境:

  • OS: Windows10 x64
  • django: 1.9.8
  • python: 2.7
  • mysql-python==1.2.5
  • mysql: 8.0.12

本地创建django项目,链接数据库的时候报错:

django.db.utils.OperationalError: (1251, 'Client does not support authentication protocol requested by server; consider upgrading MySQL client')

解决

根据stackoverflow里的问题,解决
本地登陆数据库:

mysql -u root -p 
> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'my_passwd';
    原文作者:dshowing
    原文地址: https://www.jianshu.com/p/b8f6d7383491
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞