---
title: "mysql 数据库 存储过程执行报错的解决办法"
author: "longwang617"
date: "2010-06-02T17:48:52Z"
tags: ["MySQL", "SQL"]
categories: ["数据库"]
slug: "mysql"
draft: false
lastmod: "2010-06-02T17:48:52Z"
id: 682258
url: "https://longwang617.iteye.com/blog/682258"
---

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

 

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 &gt; set global log\_bin\_trust\_function\_creators = 1;