Google cloud sql instance super privilege error

前端 未结 9 1537
挽巷
挽巷 2021-02-19 06:30

I am very new in Google app engine please help me to solve my problem

I have created one instance in Google cloud sql when I import SQL file then it shows me error like

9条回答
  •  走了就别回头了
    2021-02-19 06:54

    I ran into the the same error when backporting a gzipped dump (procured with mysqldump from a 5.1 version of MySQL) into a Google Cloud SQL instance of MySQL 5.6. The following statement in the sql file was the problem:

    DEFINER=`username`@`%`
    

    The solution that worked for me was removing all instances of it using sed :

    cat db-2018-08-30.sql |  sed -e 's/DEFINER=`username`@`%`//g' > db-2018-08-30-CLEANED.sql
    

    After removal the backport completed with no errors. Apparently SUPER privilege is needed, which isn't available in Google Cloud SQL, to run DEFINER.

    Another reference: Access denied; you need (at least one of) the SUPER privilege(s) for this operation

    Good luck!

提交回复
热议问题