How to solve the problem of setting the trigger permission in MYSQL _ MySQL

Source: Internet
Author: User
This article describes how to solve the problem of setting the trigger permission in MYSQL. you can refer to the example in this article to describe how to set the trigger permission in MYSQL. it is very useful for permission errors. The specific analysis is as follows:

When importing data from mysql, the system prompts that the SUPER Privilege permission is not granted, 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 an error is returned:

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

Cause:
Function/trigger has dangerous statements to modify the database. an error occurs only on the server that enables binary logging for master-slave replication.

The solution is as follows:

1) the user who imports data not only needs the create routine, alter routine, create trigger, alter trigger, create function, and alter function permissions, but also needs the SUPER privileges permission to use the superuser to import data.

2) give all users the permission to execute similar functions, which is dangerous and not recommended,

 o by specifying it on 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) disable binlog if no replication or slave database is required,

# binary logging – not required for slaves, but recommended#log-bin=mysql-bin# binary logging format – mixed recommended#binlog_format=mixed

I hope this article will help you design your MySQL database.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.