mysql M/S不同步存储过程?
欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 遇到一个mysql slave不同步procedure的问题。 在slave上查看mysql show procedure status where Name = 'test' \G;没有任何信息,奇怪mysql 5.0以上才有的存储过程,按理应该是能自动同步的。正常情
欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入
遇到一个mysql slave不同步procedure的问题。
在slave上查看mysql> show procedure status where Name = 'test' \G;没有任何信息,奇怪mysql 5.0以上才有的存储过程,按理应该是能自动同步的。正常情况如下mysql> show procedure status where Name = 'test' \G;*************************** 1. row *************************** Db: test Name: test Type: PROCEDURE Definer: root@localhost Modified: ……
Created: ……
Security_type: DEFINER Comment:binlog记录# mysqlbinlog mysql-bin.000056|grep -i procedure drop procedure if exists mappingProc;CREATE DEFINER=`root`@`localhost` PROCEDURE `mappingProc`(out cnt int)
==========================================现在需要手动处理了,mysqldump ――no-data ――no-create-info xxx >xxx.sql然后在slave执行sql即可==================补充dump的时候mysqldump -R ――trigger ――single-transaction xxx >xxx.sql其中,-d 表示――no-create-db, -n表示――no-data, -t表示――no-create-info, -R表示导出function和procedure.所以上述代码表示仅仅导出函数和存储过程,不导出表结构和数据。但是,这样导出的内容里,包含了trigger.再往mysql中导入时就会出问题,错误如下:error 1235 (42000) at line **: this version of mysql doesn't yet support 'multiple triggers with the same action time and event for one table'所以在导出时需要把trigger关闭。代码为mysqldump -u 数据库用户名 -p -n -t -d -r ――triggers=false 数据库名 > 文件名

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

VS Code To switch Chinese mode: Open the settings interface (Windows/Linux: Ctrl, macOS: Cmd,) Search for "Editor: Language" settings Select "Chinese" in the drop-down menu Save settings and restart VS Code

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

VS Code One-step/Next step shortcut key usage: One-step (backward): Windows/Linux: Ctrl ←; macOS: Cmd ←Next step (forward): Windows/Linux: Ctrl →; macOS: Cmd →

Visual Studio Code (VSCode) is a cross-platform, open source and free code editor developed by Microsoft. It is known for its lightweight, scalability and support for a wide range of programming languages. To install VSCode, please visit the official website to download and run the installer. When using VSCode, you can create new projects, edit code, debug code, navigate projects, expand VSCode, and manage settings. VSCode is available for Windows, macOS, and Linux, supports multiple programming languages and provides various extensions through Marketplace. Its advantages include lightweight, scalability, extensive language support, rich features and version

VS Code supports Chinese settings, which can be completed by following the steps: Open the settings panel and search for "locale". Set "locale.language" to "zh-CN" (Simplified Chinese) or "zh-TW" (Traditional Chinese). Save settings and restart VS Code. The settings menu, toolbar, code prompts, and documents will be displayed in Chinese. Other language settings can also be customized, such as file tag format, entry description, and diagnostic process language.

vscode built-in terminal is a development tool that allows running commands and scripts within the editor to simplify the development process. How to use vscode terminal: Open the terminal with the shortcut key (Ctrl/Cmd). Enter a command or run the script. Use hotkeys (such as Ctrl L to clear the terminal). Change the working directory (such as the cd command). Advanced features include debug mode, automatic code snippet completion, and interactive command history.

VS Code The methods of multi-line commenting are: 1. Shortcut keys (Ctrl K C or Cmd K C); 2. Manually add comment symbols (/ /); 3. Select menu ("Comment Block"); 4. Use extensions; 5. Recursive comments (/* /) and block comments ({/ and /}). Multi-line comments help improve code readability and maintainability, but overuse should be avoided.
