您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

运用mysqldump 工具时需要注意的问题_MySQL

2024/5/15 8:34:44发布33次查看
mysqldump
bitscn.com描述如下:
用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 [root@ytt ~]# /usr/local/mysql/bin/mysql -s /tmp/mysql1.sock --database test 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 即可。bitscn.com
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product