• notice
  • Congratulations on the launch of the Sought Tech site

Mysql sets the problem of trigger permission issues

This article describes the method of setting trigger permissions in MYSQL, which is very practical in the case of permission errors.The specific analysis is as follows:

mysqlImporting data prompts that there is no SUPER Privilege permission processing, as shown below:

ERROR 1419 (HY000): You do not have the SUPER Privilege and Binary Logging is Enabled

Import function and trigger to MySQL database and report an error:

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)".

Reason:
There are dangerous statements in the function/trigger to modify the database.The error only appears on the server where the binary logging option is enabled for master-slave replication.

The solution is as follows:

1) The user who imports the data not only needs the CREATE ROUTINE, ALTER ROUTINE, CREATE TRIGGER, ALTER TRIGGER, CREATE FUNCTION and ALTER FUNCTION permissions, but also the SUPER privileges permission to use super users to import data.

2) Let all users have the permission to execute similar functions, dangerous, not recommended,

 o by specifying it on the server start, like:

Tags

Technical otaku

Sought technology together

Related Topic

0 Comments

Leave a Reply

+