The main library displays error 1049 from the library when the stored procedure is created

Source: Internet
Author: User

MySQL Bugs: #72682: Replication MBR halts-stored procedure from unreplicated schema

MySQL Bugs: #59135: Replicate-wild-do-table:cross-database updates and create SPs break replication

If you only use replicate-wild-do-table from the library, when the main library creates the stored procedure, the library will be out of sync, with the error message as follows:

150104 15:15:46 [ERROR] Slave sql:error ' Unknown database ' fdd_statistics ' on query. Default database: ' Fdd_statistics '. Query: ' CREATE definer= ' esf_frame ' @ '% ' PROCEDURE ' Yunying_basic_data_second_boss ' (in StartDate date)

BEGIN

Set @datetime = StartDate;

INSERT INTO Fdd_report_data_second_boss


If you use replicate-do-db, you can fix the problem, but this option cannot handle the problem of working with databases across libraries.

Another approach is to use the row level log format to address (in general, the use of mixed mixed mode), but the row level of the log to the binary file of the concurrency pressure is very large, generally not recommended, unless your MySQL pressure is relatively small.

There are several solutions.

1. If you do not have cross-library operations in your business, you can use the REPLICATE-DO-DB option from the library to specify the databases that need to be synchronized.

2. The database, which is the name of the new library and the main library, can be an empty library. This way you will find that the stored procedure is synchronized. You can use Show procedure status to view it.


The main library displays error 1049 from the library when the stored procedure is created

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.