环境:
- 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';