錯誤:
Error?Code:?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)
原因:
解決辦法:
? ? 將主庫執(zhí)行:
? ? SHOW VARIABLES LIKE '%func%'; ? ?
? ? SET GLOBAL log_bin_trust_function_creators = 1 ;
? ? 先查看開啟狀態(tài)紧索,應(yīng)為OFF侮邀。開啟后,再進行查詢:
? ?? SET GLOBAL log_bin_trust_function_creators = 1 ;
? ? 應(yīng)為ON需忿。
? ?在從庫家卖,應(yīng)該先將主從復(fù)制關(guān)閉底循。
? ? ? ? SHOW SLAVE STATUS \G;
? ? ? ? STOP SLAVE惕澎;
? ??????SET GLOBAL log_bin_trust_function_creators = 1 ;?
? ? ? ? START SLAVE;