How to add SUPER priviledge to MySQL in pythonanywhere?

送分小仙女□ 提交于 2019-12-24 20:02:55

问题


I am using PythonAnywhere to host my web application for testing purpose. My frontend and python script is working fine. Now I want to connect it to MySQL database. I have uploaded my .sql file to the mysite folder and trying to restore it using this syntax:

mysql -u username -h username.mysql.pythonanywhere-services.com 'username$scm' < ab.sql

as told in Backing up (and restoring) MySQL databases (where username=created username) but it's throwing this error:

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)

I've tried to fix this error by following this How to grant super privilege to the user? but still it's throwing error:

ERROR 1044 (42000): Access denied for user 'username'@'%' to database 'username$scm'

Please help me out.


回答1:


Take a look at the answer on PythonAnywhere forums:

You would not be able to get super privileges on MySQL (only postgres). Could you disable binary logging before doing the restore? You could either try to edit the ab.sql file to take out that line, or turn it off from wherever you were creating the sqldump originally, and doing the sqldump again.



来源:https://stackoverflow.com/questions/59150115/how-to-add-super-priviledge-to-mysql-in-pythonanywhere

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!