A database trigger is a stored code sequence that is automatically executed each time a specific event is triggered within a database table. Examples of such events are the UPDATE, INSERT, or DELETE statements. Standard usage of a MySQL trigger could be to perform a check whenever a value is inserted inside a table or to calculate values that are involved in a table update. In this tutorial, we are going to introduce the procedure of creating triggers using the phpMyAdmin service in your cPanel. Let us get started!
Before you can access the PHPMyAdmin functionality, you need to log into your cPanel account with us. To do so, please check our tutorial on How to access the cPanel service.
Once logged in, please navigate to the “Database” section and click on the “phpMyAdmin” icon.
Clicking on the result redirects you to the “PHPMyAdmin” feature. In the left sidebar, you can see a list of all your databases.
Please select the database you want to create the trigger for.
Once you have selected the database, all its tables are listed in the middle of the screen.
From the bar on top, please click on the “Triggers” tab. This action takes you straight to the page, which allows you to add a database triggers.
On the top, you can see the “Triggers” section where all the existing triggers are shown. If there are no triggers created, like in our case - it is empty. To add a trigger, please click the “Add trigger” button located under the “New” section.
This action shows a popup window, which allows you to configure your new database trigger.
Below, we are going to cover the majority of the options provided in the popup window.
After you have configured your trigger, please press the “Go” button to create it.
When the database trigger is created, it is displayed under the “Triggers” section within the “Triggers” tab.
On the row where the trigger is located, you can see 3 buttons. Let’s go over all of them.
And there you have it! This is the way you can use phpMyAdmin to create database triggers. If you are facing any technical issues with this functionality, please do not hesitate to contact our technical support staff over the ticking system in your Client Area.
Sebahat is a young and bright person who had become an invaluable part of our team. Started as a Customer Care Representative who quickly evolved into a Tech-savvy well familiar with every support layer of the company. Driven by the aim to constantly improve our customers’ experience she is committed to enhancing the extraordinary support we deliver.