【问题标题】:sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (2059, "Authentication plugin 'caching_sha2_password'sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (2059, "Authentication plugin 'caching_sha2_password'
【发布时间】:2018-10-05 12:19:13
【问题描述】:

我正在学习实现 Flask 应用程序。 并使用mysql作为数据库。 我试过 MySQLdb、flask_mysql 和 flask_sqlalchemy。

但是当我尝试对数据库执行任何操作时仍然出现此错误:

sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (2059, "Authentication plugin 'caching_sha2_password' cannot be loaded: 找不到指定的模块。\r\n")

我也试过: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';

请帮忙。 谢谢。

【问题讨论】:

  • 现在得到 1193,“未知系统变量 'tx_isolation'”错误

标签: python-3.x flask flask-sqlalchemy mysql-python


【解决方案1】:

您可能需要安装 mysql 客户端。在基于 Debian 的系统上,您可以使用 sudo apt install mysql-client -y。我在使用 Python 3.6 Docker 映像时遇到了这个问题。

【讨论】:

    猜你喜欢
    • 2018-11-01
    • 2019-07-05
    • 1970-01-01
    • 2018-10-15
    • 2013-01-18
    • 2018-10-27
    • 2020-02-28
    • 2010-11-08
    • 2016-12-15
    相关资源
    最近更新 更多