MySql错误处理记录

python

  • pymysql.err.OperationalError: (1045, “Access denied for user ‘ZctLs’@’localhost’ (using password: NO)”)

  • 密码错误

  • 密码认证方式不匹配

更换了root密码的认证方式解决的,新版mysql使用的caching_sha2_password,换成mysql_native_password我就可以连上了。

步骤是在cmd命令行连接mysql, 通过mysql -u root -p

然后输入ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘pwd’;

# MySQL

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×