3
votes

I am working on a google app engine. In google cloud sql i have created one instance and whenever i import my sql file in cloud sql's instance then it shows me an error like below:

ERROR 1227 (42000) at line 1088: Access denied; you need (at least one of) the SUPER privilege(s) for this operation Operation failed with exitcode 1

What to do to get super privilege for my cloud sql instance?

4

4 Answers

2
votes

You can't have SUPER root priviliges in CLoud SQL due to its restrictions [1]. Here [2] are some tips to import files thta might help.

[1] https://cloud.google.com/sql/faq

[2] https://cloud.google.com/sql/docs/import-export#import

1
votes

you can edit import sql database file and remove DEFINER from file.

0
votes

Statement

DEFINER=username@`%

is an issue in your backup dump.

The solution that you can work around is to remove all the entry from sql dump file and import data from GCP console.

cat DUMP_FILE_NAME.sql | sed -e 's/DEFINER=<username>@%//g' > NEW-CLEANED-DUMP.sql

After removing the entry from dump and completing successfully you can try reimporting.

0
votes

I had the same problem few days ago. I deleted "Definer = your username @ local host" from MySql, and tried to import after, it worked. D