MySQL *might* want to use the less safe log_bin_trust_function_creators variable

Source: Internet
Author: User

Because the previous custom function was executed in the case of opening the log file, a detailed analysis of the error is as follows:

1. Calling a custom function

Mysql> select Sp_function_dbdh_three (); #以前自定义的函数

2. Error message:
ERROR 1418 (HY000): This function has none of deterministic, NO SQL, or READS SQ
L DATA in its declaration and binary logging are enabled (you *might* want
The less safe log_bin_trust_function_creators variable)

3. Make the following query based on the error message

4. Set the Open state

SET GLOBAL log_bin_trust_function_creators = 1;

5. After the database service restarts, the call error is found, according to the experience needs to set the environment global variable setting method as follows

(1) in the initialization parameter of the [mysqld] section plus: Log_bin_trust_function_creators=1 as shown below

(2) Make the relevant function query as follows: Explain the function of the parameter.

The above example shows that the operation of the function after initiating the log operation needs to set the parameter value otherwise it cannot be used.

MySQL *might* want to use the less safe log_bin_trust_function_creators variable

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.