首先需要用root用户登录mysql数据库
然后执行
show variables like '%function%';
mysql> show variables like '%function%';
+---------------------------------+-------+
| Variable_name | Value |
+---------------------------------+-------+
| log_bin_trust_function_creators | OFF |
+---------------------------------+-------+
1 row in set
mysql> set global log_bin_trust_function_creators=1;
Query OK, 0 rows affected
mysql>
mysql> show variables like '%function%';
+---------------------------------+-------+
| Variable_name | Value |
+---------------------------------+-------+
| log_bin_trust_function_creators | ON |
+---------------------------------+-------+
1 row in set