The problem solving method of error in MySQL import stored procedure

Source: Internet
Author: User

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//

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.