MySQL database on off and view function functions
- 2020-08-22 22:58:33
- OfStack
When you apply MySQL, you may encounter a situation where you cannot create a function. The following error message appears:
ERROR 1418 : This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
That's because it's not turned on.
Enable MySQL function:
SET GLOBAL log_bin_trust_function_creators=1;
Turn off the MySQL function:
SET GLOBAL log_bin_trust_function_creators=0;
Check status:
show variables like '%func%';