4

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?

FH-Inway
  • 4,432
  • 1
  • 20
  • 37
parth patel
  • 41
  • 1
  • 2

4 Answers4

2

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

George
  • 1,110
  • 8
  • 17
Layo
  • 677
  • 6
  • 16
2

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.

Use command to edit the dump file and generate new one -

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.

Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102
1

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

1

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

BabesB
  • 21
  • 2