【发布时间】:2020-03-27 17:26:34
【问题描述】:
我正在使用 PythonAnywhere 托管我的 Web 应用程序以进行测试。我的前端和 python 脚本工作正常。现在我想将它连接到 MySQL 数据库。我已将我的 .sql 文件上传到 mysite 文件夹并尝试使用以下语法恢复它:
mysql -u username -h username.mysql.pythonanywhere-services.com 'username$scm' < ab.sql
如 Backing up (and restoring) MySQL databases 所述(其中用户名=创建的用户名),但它抛出了这个错误:
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)
我已尝试通过遵循此How to grant super privilege to the user? 来修复此错误,但它仍然抛出错误:
ERROR 1044 (42000): Access denied for user 'username'@'%' to database 'username$scm'
请帮帮我。
【问题讨论】:
标签: python mysql flask pythonanywhere