Mysql import Stored Procedure unavailable

Source: Internet
Author: User
Tags mysql import

In mysql, you have the following permissions to edit or delete a stored procedure: alter routine, create routine, and EXECUTE, next I will introduce you to a problem I encountered.

The creator of a stored procedure has the ALTER, CREATE, and EXECUTE permissions for the stored procedure.

When there is a stored procedure in the database imported through mysql, the stored procedure cannot be used by the program after the import. After a long time, the cause is found to be a permission issue.

1. We need to view the stored procedures in the database: Enter

The Code is as follows: Copy code

Mysql> show function status;

Result After running:

2. Modify the values of the Definer and Security_type fields of the stored procedure.
The account used to join our program to connect to the database is leiming, and the address used to connect to the database is
We need to enter

The Code is as follows: Copy code

Mysql> update mysql. proc set Definer = 'leiming @ ';

Then modify the Security_type field:

The Code is as follows: Copy code

Mysql> update mysql. proc set Security_type = 'invoker ';

Here we are modifying all the stored procedures. Of course, you only need to add the where condition to modify the stored procedure.

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: 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.