思路话语

。Arlen:思想有多远你就能走多远...

mysql触发器triggers dump出来后恢复不了

mysql中创建了触发器triggers,但是在mysqldump出来后恢复不了

提示创建触发器的语句有问题:

 

代码
/*!50003 CREATE*/ /*!50017 DEFINER=`mysql`@`localhost`*/ /*!50003 TRIGGER `idc_insert` AFTER INSERT ON `equipment_position` FOR EACH ROW UPDATE t_device SET lastupdate = NOW() WHERE id = NEW.equipmentid and NEW.configitemid=2 */;;

 

 

 

Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/' at line 1
(0 ms taken)

 

于是mysqldump出来的时候干脆把触发器关掉:

mysqldump  --opt --triggers=false $DB 表1 表2...>test.sql

 

用mysqldump导出的触发器竟然用mysql恢复不了。

 

 

posted on 2009-12-11 21:26  Arlen  阅读(560)  评论(0编辑  收藏  举报

导航