Unix Technical Forum

how to dump triggers separately

This is a discussion on how to dump triggers separately within the MySQL General forum forums, part of the MySQL category; --> I need to create dump of all triggers in my database (This means that ONLY triggers must be dumped ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 06:03 AM
asv@pallant-mobile.ru
 
Posts: n/a
Default how to dump triggers separately

I need to create dump of all triggers in my database (This means that ONLY
triggers must be dumped and nothing more: no data and no table structure). Is
there any direct (or simple) way to do that? Mysqldump seems to be unable to
do that.
The only two ways i see -- to create a script that gets triggers by "show
triggers" query or reads them directly from INFORMATION_SCHEMA. Is there a
more simple way?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 06:03 AM
Rolando Edwards
 
Posts: n/a
Default Re: how to dump triggers separately

It would be advisable that your triggers be dumeds in association with your table structures like this

mysqldump -h... -u... -p... --no-data --triggers <dbname>

However, the next line is what you are looking for

mysqldump -h... -u... -p... --no-data --no-create-info --triggers <dbname>

----- Original Message -----
From: asv@pallant-mobile.ru
To: mysql@lists.mysql.com
Sent: Friday, March 23, 2007 9:23:06 AM (GMT-0500) Auto-Detected
Subject: how to dump triggers separately

I need to create dump of all triggers in my database (This means that ONLY
triggers must be dumped and nothing more: no data and no table structure). Is
there any direct (or simple) way to do that? Mysqldump seems to be unable to
do that.
The only two ways i see -- to create a script that gets triggers by "show
triggers" query or reads them directly from INFORMATION_SCHEMA. Is there a
more simple way?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=redwards@swmx.com


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:28 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com