If TAS is configured to use RDS MySQL 5.7 database, updating credhub instance might fail with the following error during TAS upgrade to a higher version that's shipped with Credhub BOSH release 2.12.70 ~ 2.12.85.
Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: Migration V58__remove_triggers.sql failed
-----------------------------------------
SQL State : HY000
Error Code : 1419
Message : (conn=86995) 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)
Location : db/migration/mysql/V58__remove_triggers.sql (/var/vcap/data/packages/credhub/c09051cc773c59509c7e05ff558a7537df907afe/file:/var/vcap/data/packages/credhub/c09051cc773c59509c7e05ff558a7537df907afe/cred
hub.jar!/BOOT-INF/classes!/db/migration/mysql/V58__remove_triggers.sql)
Line : 2
Statement : DROP TRIGGER IF EXISTS tr_credential_version_pre_del
There is a change introduced in the aforementioned Credhub BOSH releases, which attempt to drop some triggers from the credhub database. However the "Drop Triggers" SQL statement couldn't work with current default settings of RDS MySQL 5.7 instance.
Please also pay attention to the following statement in TAS release note and github issue.
DROP TRIGGER IF EXISTS tr_credential_version_pre_del; DROP TRIGGER IF EXISTS tr_credential_version_post_del; DROP TRIGGER IF EXISTS tr_credential_pre_del;