在恢複mysql資料庫時提示
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)
原因:是因為開啟了bin-log
解決辦法
SQL code
mysql> show variables like 'log_bin_trust_function_creators';
+---------------------------------+-------+
| Variable_name | Value |
| log_bin_trust_function_creators | OFF |
mysql> set global log_bin_trust_function_creators=1;
| log_bin_trust_function_creators | ON |
這樣添加了參數以後,如果mysqld重新開機,那個參數又會消失,是以記得在my.cnf配置檔案中添加:
log_bin_trust_function_creators=1