Forums

How to add SUPER priviledge to MySQL ?

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.

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.

Ok I understood this but somehow I overcome this problem by copy pasting the content in backup file in mysql console. Now another problem is arising is that the triggers are not getting fired which I had written for some tables. The triggers were present in the backup file. How can I import those triggers or if it is imported how it will get fired ?

We don't support triggers for MySQL- to get more admin/root privileges you would have to switch to Postgres, where you get your own server + admin user.