How can I find all the db triggers in MySQL?
25,881
Solution 1
Click on the 'SQL' tab and enter this query:
SHOW TRIGGERS
Solution 2
select * from information_schema.triggers where trigger_schema = 'your_db'
Solution 3
to see all your routines the code is...
select * from information_schema.routines
Author by
Tattat
Updated on July 31, 2022Comments
-
Tattat almost 2 years
I created a trigger using SQL, how can I see the trigger using MySQL in phpMyadmin?
-
Nicola Cossu over 13 yearsYou can use mysqldump with --triggers switch dev.mysql.com/doc/refman/5.0/en/mysqldump.html
-
Devart over 13 yearsOr you can use Database Backup or Gen.Schema Script in dbForge Studio for MySQL.
-
dionyziz over 12 yearsThere are commands to manage a database schema other than interacting directly with the information_schema database such as SHOW TRIGGERS which should be preferred.
-
sdjuan over 11 yearsmysqldump backs up triggers by default: "--triggers Include triggers for each dumped table in the output. This option is enabled by default;"
-
daker over 9 yearsIs this the best way if you want to create a view of your triggers? SHOW TRIGGERS is not valid in "AS" for create view.