How can I solve the problem when importing data into mysql?

Source: Internet
Author: User
Tags mysql import

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

Related Article

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.