MySQL创建函数,报错;SQL Error (1418)

MySQL函数不能创建,是未开启创建功能:

mysql> show variables like '%func%';  
+---------------------------------+-------+  
| Variable_name                   | Value |  
+---------------------------------+-------+  
| log_bin_trust_function_creators | OFF   |  
+---------------------------------+-------+  
1 row in set (0.00 sec)  

mysql> set global log_bin_trust_function_creators=1;  
Query OK, 0 rows affected (0.00 sec)  
mysql> show variables like '%func%';  
+---------------------------------+-------+  
| Variable_name                   | Value |  
+---------------------------------+-------+  
| log_bin_trust_function_creators | ON    |  
+---------------------------------+-------+  
1 row in set (0.00 sec)mysql> 

你可能感兴趣的:(sql,mysql,函数,error,1418)