Workaround for MySQL set trigger permission problem

Source: Internet
Author: User
Tags mixed mysql import

The example in this article describes how MySQL sets trigger permissions and is useful for permissions errors. The specific analysis is as follows:

MySQL Import data tip does not have SUPER privilege permission handling, 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 don't have the SUPER privilege and binary logging are enabled (you *might* want for use of the less safe log_bin_trust_fun Ction_creators variable) ".

Reason:

Function/trigger Dangerous statements Modify the database, errors occur only on servers that have the binary logging option enabled for master-slave replication.

Here's how to fix it:

1) Users importing 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 super users.

2) Let all users have the ability to perform similar functions, dangerous, 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) If you do not need to copy, or from the library, close the Binlog,

?

1 # binary Logging–not required for slaves, but recommended

2 #log-bin=mysql-bin

3 # Binary Logging format–mixed recommended

4 #binlog_format =mixed







This article from "Linux" blog, declined reprint!

Workaround for MySQL set trigger permission problem

Related Article

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.