Issue
When you try to copy a database from one environment to another, you get this error message in the logs:
stdout was:
stderr was: + set -o pipefail
+ mysql -h XXXXX -u XXXXX -pXXXXX -e 'DROP DATABASE IF EXISTS `mydb`; CREATE DATABASE `mydb` /*!40100 DEFAULT CHARACTER SET utf8 */'
Warning: Using a password on the command line interface can be insecure.
+ mysqldump -qcK --single-transaction -h XXXXX -u XXXXX -pXXXXX
+ LANG=C
+ sed -e 's|^/[*]!50001 CREATE ALGORITHM=UNDEFINED [*]/|/*!50001 CREATE */|' -e '/^[/][*]!50013 DEFINER=/d'
+ mysql -h XXXXX -u XXXXX -pXXXXX mydb
Warning: Using a password on the command line interface can be insecure.
Warning: Using a password on the command line interface can be insecure.
ERROR 1227 (42000) at line 4241: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
mysqldump: Got errno 32 on write
Resolution
Manually import the database, as explained in this documentation.
Cause
The database includes MySQL triggers, stored procedures, or functions statements, which does require SUPER privileges as the error stated and these are not supported on the platform.