There are many errors reported during the mysql import stored procedure. Today I have summarized two error messages and solutions. I hope this tutorial will be helpful to all of you.
The following error is returned when I import a stored procedure to mysql today:
You * might * want to use the less safe log_bin_trust_function_creators variable
To solve this problem, you only need to enter mysql and enter:
Solution
Search for [mysqld] In my. ini
Add a sentence directly below:
The Code is as follows: |
Copy code |
Log-bin-trust-function-creators = 1 |
Or directly use
The Code is as follows: |
Copy code |
Mysql> set global log_bin_trust_function_creators = 1;
|
Exit and re-import the stored procedure. The operation is successful.
If you do not encounter the above problems, you may encounter the following problems frequently encountered during the import of storage:
Error Code: 1064
You have an 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 details, refer to the mysql official manual.
If delimiter is added, no message is reported.
The 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; -- why is an error reported here? END // |