14

I created a trigger using SQL, how can I see the trigger using MySQL in phpMyadmin?

Boris D. Teoharov
  • 2,319
  • 4
  • 30
  • 49
Tattat
  • 15,548
  • 33
  • 87
  • 138

3 Answers3

28

Click on the 'SQL' tab and enter this query:

SHOW TRIGGERS
Eugene Yarmash
  • 142,882
  • 41
  • 325
  • 378
  • 2
    You can use mysqldump with --triggers switch http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html – Nicola Cossu Mar 24 '11 at 14:41
  • 1
    Or you can use Database Backup or Gen.Schema Script in dbForge Studio for MySQL. – Devart Mar 24 '11 at 15:00
  • 1
    mysqldump backs up triggers by default: "--triggers Include triggers for each dumped table in the output. This option is enabled by default;" – sdjuan Jan 19 '13 at 00:04
5
select * from information_schema.triggers where trigger_schema = 'your_db'
Nicola Cossu
  • 54,599
  • 15
  • 92
  • 98
  • 3
    There are commands to manage a database schema other than interacting directly with the information_schema database such as SHOW TRIGGERS which should be preferred. – dionyziz Feb 26 '12 at 17:31
  • Is this the best way if you want to create a view of your triggers? SHOW TRIGGERS is not valid in "AS" for create view. – daker Nov 13 '14 at 08:16
1

to see all your routines the code is...

select * from information_schema.routines
swapnesh
  • 26,318
  • 22
  • 94
  • 126
Silvio Troia
  • 1,439
  • 19
  • 36