mysql 数据库 存储过程执行报错的解决办法

每次重启后,执行存储过程总会报错,异常如下:

 

SQL state [HY000]; 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); nested exception is java.sql.SQLException: 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 > set global log_bin_trust_function_creators = 1;

 

 

 

你可能感兴趣的:(sql,mysql)