This article describes the MySQL set trigger permissions method, the situation is very useful for permissions errors. The specific analysis is as follows:
The MySQL import data hint does not have the Super Privilege permission processing, as follows:
ERROR 1419 (HY000): You don't have the SUPER privilege and Binary Logging is Enabled
Import function, trigger to MySQL database, error:
You did not have the SUPER privilege and binary logging are enabled (you *might* want to use the less safe log_bin_trust_fun Ction_creators variable) ".
Reason:
Dangerous statements Modify the database in Function/trigger, and errors occur only on servers that have the binary logging option for master-slave replication.
The workaround is as follows:
1 Users who import data need not only create routine, alter routine, create TRIGGER, alter TRIGGER, create FUNCTION and ALTER function permissions, but also super PR Ivileges permissions to import data using Superuser.
2 Let all users have the right to execute similar functions, dangerous, not recommended,
O by specifying it in the server start, Like:–log-bin-trust-function-creators=1
o by setting it to 1 through the SET Global statement, like:
mysql> SET GLOBAL log_bin_trust_function_creators = 1;
3 If you do not need to copy, or from the library, close the Binlog,
# binary Logging–not required for slaves, but recommended
#log-bin=mysql-bin
# binary Logging format–mixed rec ommended
#binlog_format =mixed
I hope this article will help you with the design of MySQL database.