Today, when you import the stored procedure to MySQL, the error is as follows:
You are *might* want to use the less safe log_bin_trust_function_creators variable
To handle this problem, just go into MySQL and enter:
Solutions
Search in My.ini [mysqld]
Add a sentence directly below:
| The code is as follows |
Copy Code |
Log-bin-trust-function-creators=1 |
or direct use
| The code is as follows |
Copy Code |
mysql> SET GLOBAL log_bin_trust_function_creators = 1;
|
Exit, re-import stored procedure, successful
If you do not appear above the problem, you may encounter this type of problem when importing stored procedures often meet the following declare error:
Error code:1064
You have a error in your SQL syntax; Check the manual that corresponds to your MySQL server version for the right syntax to use near ' at line 3
(0 ms taken)
For specific reasons, you can view the official MySQL manual
When you add a delimiter, you don't report it.
| code is as follows |
copy code |
| Delimiter// CREATE PROCEDURE P8 () begin DECLARE a int; DECLARE b int; SET A = 5; SET b = 5; Declare cur0 cursor for select Pkid from t_vsm_secpolicy_usergroup; -this Why is there an error? end// |