1、卸载了Mysql5.5,重新安装了Mysql8,运行python manage.py makemigrations报错
卸载方法参考:https://blog.csdn.net/t_login/article/details/78344677
原因和解决方法:https://www.jianshu.com/p/e6e6293af2dc
主要就是mysql8.0的问题。
目前最新的mysql8.0对用户密码的加密方式为caching_sha2_password, django暂时还不支持这种新增的加密方式。只需要将用户加密方式改为老的加密方式即可。
1、打开Mysqlsh
2、连接mysql:\connect root@127.0.0.1:3306
输入密码
n
3、切换到sql命令:\sql
4、使用Mysql:user mysql;(注意要有分号)
5、输入:alter user 'root'@'localhost' identified with mysql_native_password by 'root';
6、输入:flush privileges;
再执行就不报错了