mysql创建函数1418_Mysql中创建函数报“ERROR 1418 ”的解决方法
我們?cè)谑褂胢ysql數(shù)據(jù)庫(kù)開(kāi)發(fā)項(xiàng)目的時(shí)候,有時(shí)Mysql系統(tǒng)自帶的函數(shù)不能完全滿足我們開(kāi)發(fā)的需要,解決方法是自己創(chuàng)建函數(shù),可以有可能在你創(chuàng)建函數(shù)的過(guò)程事會(huì)報(bào)出Error
1418錯(cuò)誤,對(duì)于報(bào)這種錯(cuò)誤的詳細(xì)信息如所所示
出錯(cuò)信息大致類(lèi)似:
ERROR 1418 (HY000): 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)
ERROR 1418 (HY000): 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)
解決方法:MySQL函數(shù)不能創(chuàng)建,是未開(kāi)啟功能:
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>
如果上方法不能成功解決mysql中的ERROR 1418錯(cuò)誤,那還得請(qǐng)你使用下面方法試試:
第一步: mysql> SET GLOBAL log_bin_trust_function_creators =
1;
第二步: 系統(tǒng)啟動(dòng)時(shí) --log-bin-trust-function-creators=1
第三步: 在my.ini(Linux下為my.conf)文件中 [mysqld] 標(biāo)記后加一行內(nèi)容為
log-bin-trust-function-creators=1
總結(jié)
以上是生活随笔為你收集整理的mysql创建函数1418_Mysql中创建函数报“ERROR 1418 ”的解决方法的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: mysql回收权限_mysql回收权限不
- 下一篇: linux重新编译mysql_linux