Mysql Set trigger permission problem resolution _MYSQL

Source: Internet
Author: User
Tags mixed mysql import

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.

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.