【问题标题】:How to import local .sql file to pythonanywhere database?如何将本地 .sql 文件导入 pythonanywhere 数据库?
【发布时间】:2020-03-26 20:48:53
【问题描述】:

我在 pythonanywhere 中部署了一个应用程序,到目前为止一切都运行良好。现在我想将我的应用程序与数据库连接起来,因为我的应用程序需要与之交互。我的 .sql 文件存储在我的计算机中。 如何将其导入到 pythonanywhere 服务器中的项目数据库中?

我已尝试使用 MySQL Workbench 连接该数据库,以便可以从那里导入,但 Workbench 无法连接到该服务器。

【问题讨论】:

    标签: python mysql pythonanywhere


    【解决方案1】:

    在 PythonAnywhere 上有两条有用的说明,一条是关于 Backing up (and restoring) MySQL databases 的,另一条是关于 accessing your MySQL database from outside PythonAnywhere 的(你可以使用 ssh 隧道来完成)。

    【讨论】:

    • 我已经按照第 1 步的第 2 步进行了操作,但出现了连接错误,但现在我尝试了第 1 步。但在导入时显示此错误ERROR 1419 (HY000) at line 88: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_ trust_function_creators variable)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-07-27
    • 2020-11-07
    • 2012-01-10
    • 2016-12-05
    • 2014-01-07
    • 2013-12-28
    • 2014-06-18
    相关资源
    最近更新 更多