創建mysql數據庫中的函數時候首先要看數據庫是否開啓了函數自定義的設置
mysql> show variables like '%func%';
+-----------------------------------------+-------+
| Variable_name | Value |
+-----------------------------------------+-------+
| log_bin_trust_function_creators | ON |
+-----------------------------------------+-------+
1 row in set (0.02 sec)
二、如果Value處值爲OFF,則需將其開啓。
mysql> set global log_bin_trust_function_creators=1;
二、創建函數時候的運行使用delimiter解釋如下
http://blog.csdn.net/yuxin6866/article/details/52722913