CREATE TRIGGER trigger_LocationType_Insert
BEFORE UPDATE ON LocationType
FOR EACH ROW
SET NEW.NAME = ''
Returns this error:
[HY000][1419] 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)
I know this is because even the root user "has all privileges except SUPER and FILE." https://cloud.google.com/sql/docs/mysql/users
And I think that if I could "Set log_bin_trust_function_creators to 1" then it would work (this user does have CREATE TRIGGER permission). However, I don't see how to do that in the Google Cloud SQL console or from a sql statement.
How do you create a TRIGGER then within this environment?
Since triggers execute as part of a transaction, the following statements are not allowed in a trigger: All create commands, including create database, create table, create index, create procedure, create default, create rule, create trigger, and create view.
Unsupported client program featuresmysqldump using the --tab option or options that are used with --tab . This is because the FILE privilege is not granted for instance users. All other mysqldump options are supported.
Does MySQL 5.7 have statement-level or row-level triggers? In MySQL 5.7, all triggers are FOR EACH ROW ; that is, the trigger is activated for each row that is inserted, updated, or deleted. MySQL 5.7 does not support triggers using FOR EACH STATEMENT .
This page described how to change MySQL configuration options for a Google Cloud instance: https://cloud.google.com/sql/docs/mysql/flags
Select the instance to open its Instance Overview page.
The database flags that have been set are listed under the Database flags section.
You have to use their UI to change global variables, because you can't use SET GLOBAL
without SUPER privilege.
The log_bin_trust_function_creators
option is listed among the supported configuration options you can change in the UI on the page I linked to above.
To read more about this error, see https://dev.mysql.com/doc/refman/5.7/en/stored-programs-logging.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With