运用mysqldump 工具时需要注意的问题
时间:2024-01-20 07:11:56
描述如下:
用mysqldump 导出 Trigger 的时候遇到一个问题,贴出来,以免大家犯错。
在执行下面的操作时:
[root@ytt ~]# /usr/local/mysql/bin/mysqldump -S /tmp/mysql1.sock test > test.sql
导出的结果里面含有 Trigger.
[root@ytt ~]# /usr/local/mysql/bin/mysqldump -S /tmp/mysql1.sock -Rdtn test > test_sp.sql
导出的结果里面仍然含有 Trigger.
导入的时候出错:
[root@ytt ~]# /usr/local/mysql/bin/mysql -S /tmp/mysql1.sock --database test < test.sql
[root@ytt ~]# /usr/local/mysql/bin/mysql -S /tmp/mysql1.sock --database test < sp.sql
ERROR 1235 (42000) at line 26: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
解决办法:
默认不带任何参数的时候 tiggers 值为真,那么我们修改他的值为假,给mysqldump 加上开关: --triggers=false 即可。
标签:mysqldump,Trigger
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Google开源的Python格式化工具YAPF的安装和使用教程
2023-02-02 12:32:16
![](https://img.aspxhome.com/file/2023/0/86420_0s.png)
一百多行python代码实现抢票助手
2022-05-20 00:55:52
情感的容器 被寄托了的QQ2010视觉设计
2010-02-03 14:51:00
![](https://img.aspxhome.com/file/UploadPic/20102/3/201002-qq2010-ui-02-80s.jpg)
MySql树形结构(多级菜单)查询设计方案
2024-01-18 15:35:42
![](https://img.aspxhome.com/file/2023/4/116794_0s.png)
安装Mysql时可能会遇到的一些疑难杂症
2024-01-28 13:30:09
![](https://img.aspxhome.com/file/2023/2/65702_0s.png)
编码问题引起的折腾
2009-07-03 12:43:00
javascript中直接写php代码的方法
2024-05-02 16:27:46
Python实现查询剪贴板自动匹配信息的思路详解
2022-09-16 06:35:41
![](https://img.aspxhome.com/file/2023/3/115203_0s.png)
JavaScript语法约定和程序调试原理解析
2024-04-18 09:46:22
![](https://img.aspxhome.com/file/2023/6/136276_0s.png)
为Python的web框架编写MVC配置来使其运行的教程
2022-05-30 01:54:32
![](https://img.aspxhome.com/file/2023/7/115737_0s.jpg)
用Python读取几十万行文本数据
2023-10-13 21:56:04
pytorch forward两个参数实例
2022-09-05 09:54:34
用Python进行一些简单的自然语言处理的教程
2021-07-03 19:51:26
Python流程控制语句的深入讲解
2023-12-01 00:06:31
![](https://img.aspxhome.com/file/2023/6/101066_0s.png)
jupyter notebook 多环境conda kernel配置方式
2022-09-05 04:45:36
![](https://img.aspxhome.com/file/2023/1/133721_0s.jpg)
go 读取BMP文件头二进制读取方式
2024-02-16 03:29:24
![](https://img.aspxhome.com/file/2023/8/112278_0s.jpg)
SQL中的开窗函数详解可代替聚合函数使用
2024-01-20 08:03:24
![](https://img.aspxhome.com/file/2023/7/86877_0s.png)
PHP基于openssl实现非对称加密代码实例
2023-07-13 05:38:22
python获取文件后缀名及批量更新目录下文件后缀名的方法
2021-02-19 20:51:14
基于tensorflow for循环 while循环案例
2022-01-26 14:40:34