{"id":14917,"date":"2024-02-14T19:26:43","date_gmt":"2024-02-15T00:26:43","guid":{"rendered":"https:\/\/kb.n0c.com\/?post_type=ht_kb&#038;p=14917"},"modified":"2026-07-21T15:55:54","modified_gmt":"2026-07-21T19:55:54","slug":"how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key","status":"publish","type":"ht_kb","link":"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/","title":{"rendered":"How to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>It is sometimes necessary to create a <strong>trigger<\/strong>, <strong>procedure<\/strong> and <strong>function<\/strong> on N0C by connecting via SSH and coding them in MySQL.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Note :<\/strong> do <strong><em>not<\/em><\/strong> use phpMyAdmin. Triggers and functions are always linked to the user. In phpMyAdmin, the user is temporary: therefore, as soon as the user is automatically deleted, the triggers and functions are automatically deleted too.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Note :<\/strong>&nbsp;The&nbsp;<a href=\"https:\/\/kb.n0c.com\/en\/glossary\/\">Glossary<\/a>&nbsp;contains explanations on multiple topics and can be consulted to clarify certain terms.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<p>This article is based on <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/en\/trigger-syntax.html\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL Reference Manual<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Go to&nbsp;<a href=\"https:\/\/mg.n0c.com\/en\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/mg.n0c.com\/en\/<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Definitions<\/h2>\n\n\n\n<p>A <strong>trigger<\/strong> is a mechanism that automatically executes a procedure in a table when a particular event occurs for that table, for example when a user is about to modify the contents of a database. In this article, we&#8217;ll use the term trigger, as the term d\u00e9clencheur is not widely used in IT jargon.<\/p>\n\n\n\n<p>A <strong>procedure<\/strong> executes a set of SQL statements.<\/p>\n\n\n\n<p>A <strong>function<\/strong> is a sub-program consisting of a set of instructions identified by a name, the execution of which produces a value that refers to the point at which the sub-program was called.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Connect Using SSH and MySQL<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to your account with an SSH key (please refer to the article <a href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-an-ssh-key-and-connect-to-an-account\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Create an SSH Key and Connect to an Account Remotely<\/a>).<\/li>\n\n\n\n<li>Make sure you have a MySQL user by retrieving it as the main user or by creating a user with database privileges (please refer to the article <a href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/databases\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Manage Databases with Maria DB<\/a>).<\/li>\n\n\n\n<li>Connect to MySQL with the command below:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>mysql -u user dbname -p<\/strong><\/pre>\n\n\n\n<p>Where :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>user<\/strong> must be replaced by your main username or a MySQL user; and<\/li>\n\n\n\n<li><strong>dbname<\/strong> must be replace by the name of the database.<\/li>\n<\/ul>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>Enter your password.<\/li>\n\n\n\n<li>Confirm the connection.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">How to create a trigger<\/h2>\n\n\n\n<p>Here we explain how to create a trigger in MySQL, using the <strong>CREATE TRIGGER<\/strong> statement.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Connect via SSH and MySQL as explained above (see <strong><a href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/#:~:text=program%20was%20called.-,How%20to%20Connect%20Using%20SSH%20and%20MySQL,-Log%20in%20to\">How to Connect Using SSH and MySQL<\/a><\/strong>).<\/li>\n\n\n\n<li>In the command line interface, write your code using this syntax:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-blue-color\">CREATE TRIGGER<\/span> trigger_name\n\n{ <span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-blue-color\">BEFORE<\/span> | <span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-blue-color\">AFTER<\/span> } { <span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-blue-color\">INSERT<\/span> | <span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-blue-color\">UPDATE<\/span> | <span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-blue-color\">DELETE<\/span> }\n\n<span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-blue-color\">ON<\/span> tbl_name <span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-blue-color\">FOR EACH ROW<\/span>\n\ntrigger_body; <\/pre>\n\n\n\n<p>In this syntax:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After <strong>CREATE TRIGGER<\/strong>, provide the name of the trigger (<strong>trigger_name<\/strong> in the example) that you want to create;<\/li>\n\n\n\n<li>After <strong>BEFORE<\/strong> or <strong>AFTER<\/strong>, specify the trigger action time (<strong>trigger_time<\/strong>), which indicates whether the trigger is executed before or after the row is modified;<\/li>\n\n\n\n<li>Specify the type of operation that activates the trigger (<strong>trigger_event<\/strong>). Permitted values are:\n<ul class=\"wp-block-list\">\n<li><strong>INSERT<\/strong> : the trigger is activated as soon as a new row is added to the table;<\/li>\n\n\n\n<li><strong>UPDATE<\/strong> : the trigger is activated as soon as a row in the table is modified;<\/li>\n\n\n\n<li><strong>DELETE<\/strong> : the trigger is activated as soon as a row is deleted from the table.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After <strong>ON<\/strong>, specify the name of the table to which the trigger belongs (<strong>tbl_name<\/strong>);<\/li>\n\n\n\n<li><strong>trigger_body<\/strong> is the instruction to be performed when the trigger is activated.<\/li>\n<\/ul>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>The operation has worked if you see the message &#8220;<strong>Query OK, 0 rows affected (0.xyz sec)<\/strong>&#8221; (<strong>0.xyz<\/strong> being the number of seconds required to execute the trigger).<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Note :<\/strong> The <strong>DEFINER<\/strong> command does not appear in the code because, in this case, it is the user who, by default, executes the <strong>CREATE TRIGGER<\/strong> declaration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>OLD and NEW<\/strong> Keywords<\/h3>\n\n\n\n<p>You can use the keywords <strong>OLD<\/strong> and <strong>NEW<\/strong>, which refer to the pre-trigger value and the new value respectively.<\/p>\n\n\n\n<p>The trigger can access the values of the column concerned by the declaration. The modifiers <strong>OLD<\/strong> and <strong>NEW<\/strong> are used to distinguish between the value of columns BEFORE and AFTER the operation is triggered.<\/p>\n\n\n\n<p>For example, if you update the column description in <strong>trigger_body<\/strong>, you can access the description value before the update (<strong>OLD.description<\/strong>) and the new value (<strong>NEW.description<\/strong>).<\/p>\n\n\n\n<p>The following table illustrates the availability of these keywords:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Operation type (trigger_event)<\/strong><\/td><td><strong>OLD<\/strong><\/td><td><strong>NEW<\/strong><\/td><\/tr><tr><td>INSERT<\/td><td>No<\/td><td>Yes<\/td><\/tr><tr><td>UPDATE<\/td><td>Yes<\/td><td>Yes<\/td><\/tr><tr><td>DELETE<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example<\/strong><\/h3>\n\n\n\n<p><em>Input<\/em> :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE TRIGGER log_users AFTER UPDATE ON users FOR EACH ROW INSERT INTO logs(user_id, action) VALUES(NEW.id, 'action name\u2019); <\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE TRIGGER nom_du_trigger\n\n &nbsp; AFTER UPDATE ON nom_de_la_table FOR EACH ROW\n\n &nbsp; requete_sql_a_lancer;<\/pre>\n\n\n\n<p><em>Output<\/em> :&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&gt; CREATE TRIGGER log_users AFTER UPDATE ON users FOR EACH ROW INSERT INTO logs(user_id, action) VALUES(NEW.id, 'action name');\n\nQuery OK, 0 rows affected (0.020 sec) <\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">How to Create a Procedure<\/h2>\n\n\n\n<p>Here we explain how to create a procedure in MySQL, using the <strong>CREATE PROCEDURE<\/strong> statement.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Connect via SSH and MySQL as explained above (see <strong><a href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/#:~:text=program%20was%20called.-,How%20to%20Connect%20Using%20SSH%20and%20MySQL,-Log%20in%20to\">How to Connect Using SSH and MySQL<\/a><\/strong>).<\/li>\n\n\n\n<li>In the command line interface, write your code using this syntax:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">DELIMITER \/\/\n\n\nCREATE PROCEDURE ProcedureName(\n     IN varName VARCHAR(255)\n)\n\n\nBEGIN\n\n     SELECT *\n &nbsp;   FROM table1\n     WHERE champ1 = varName;\n\nEND \/\/\n\n\nDELIMITER ; <\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>In this syntax:<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Temporarily redefine the delimiter by typing <strong>DELIMETER \/\/<\/strong><sup><strong>1<\/strong><\/sup>;<\/li>\n\n\n\n<li>After <strong>CREATE PROCEDURE<\/strong>, enter the name of the procedure (<strong>ProcedureName<\/strong>) you wish to create;<\/li>\n\n\n\n<li>Before <strong>VARCHAR<\/strong>, state the procedure&#8217;s character strings and specify the number of bytes in brackets (in our example, <strong>varName<\/strong> is the character string and <strong>255<\/strong> is the number of bytes);<\/li>\n\n\n\n<li>Write <strong>BEGIN<\/strong> to mark the start of the procedure program;<\/li>\n\n\n\n<li>In our example, the procedure consists of retrieving selected rows from a table (here named <strong>table1<\/strong>) using the <strong>SELECT *<\/strong> command, where field <strong>field 1<\/strong> is equal to the string <strong>varName<\/strong>;<\/li>\n\n\n\n<li>Write <strong>END \/\/<\/strong> to mark the end of procedure execution;<\/li>\n\n\n\n<li>Return to the default delimiter (;) by entering <strong>DELIMITER ;<sup>2<\/sup><\/strong>.<\/li>\n<\/ul>\n\n\n\n<p style=\"font-size:12px\"><span style=\"background-color:rgba(0, 0, 0, 0);color:#808080\" class=\"has-inline-color\"><strong><sup>1<\/sup><\/strong> A stored procedure consists of several declarations separated by a semicolon (;). If you use a MySQL client program to define a stored procedure that contains semicolons, the MySQL program will not treat the entire stored procedure as a single statement, but as several statements.<br><br><strong><sup>2<\/sup><\/strong> This makes it possible to separate declarations and run each one separately.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Create a Function<\/h2>\n\n\n\n<p>Here we explain how to create a function in MySQL, using the <strong>CREATE FUNCTION<\/strong> statement.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Connect via SSH and MySQL as explained above (see <strong><a href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/#:~:text=program%20was%20called.-,How%20to%20Connect%20Using%20SSH%20and%20MySQL,-Log%20in%20to\">How to Connect Using SSH and MySQL<\/a><\/strong>).<\/li>\n\n\n\n<li>In the command line interface, write your code using this syntax:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">DELIMITER $$\n \n\n CREATE FUNCTION FunctionName(\n &nbsp; &nbsp; param1 INT,\n &nbsp; &nbsp; param2 VARCHAR(255))\n RETURNS BOOLEAN\n \n\n BEGIN\n &nbsp;-- statements\n &nbsp;return true;\n END $$\n \n\n DELIMITER ; <\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>In this syntax:<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Temporarily redefine the delimiter by typing <strong>DELIMETER $$<\/strong>;<\/li>\n\n\n\n<li>After <strong>CREATE FUNCTION<\/strong>, enter the name of the function (<strong>FunctionName<\/strong>) you wish to create;<\/li>\n\n\n\n<li>Prefix <strong>INT<\/strong> with integers (in our example, <strong>param1 <\/strong>is an integer);<\/li>\n\n\n\n<li>List strings before <strong>VARCHAR<\/strong> and specify the number of bytes in brackets (in our example, <strong>param2<\/strong> is the string and <strong>255<\/strong> is the number of bytes);<\/li>\n\n\n\n<li>Write <strong>RETURNS BOOLEAN<\/strong> so that the function returns a true or false value;<\/li>\n\n\n\n<li>Write <strong>BEGIN<\/strong> to mark the start of the function program;<\/li>\n\n\n\n<li>Write your function&#8217;s declarations (<strong>&#8211; &#8211; statements<\/strong> in our example);<\/li>\n\n\n\n<li>Write <strong>return<\/strong> to end execution of the function and return a value (the value is <strong>&#8220;true&#8221;<\/strong> in the example);<\/li>\n\n\n\n<li>Write <strong>END $$<\/strong> to mark the end of function execution;<\/li>\n\n\n\n<li>Return to the default delimiter (;) by typing<strong> DELIMITER ;<\/strong>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction It is sometimes necessary to create a trigger, procedure and function on N0C by connecting via SSH and coding them in MySQL. References This article is based on MySQL Reference Manual. Prerequisites Go to&nbsp;https:\/\/mg.n0c.com\/en\/. Definitions A trigger is a mechanism that automatically executes a procedure in a table when&#8230;<\/p>\n","protected":false},"author":4,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[164],"ht-kb-tag":[],"class_list":["post-14917","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-databases"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key - N0C KB<\/title>\n<meta name=\"description\" content=\"This article explains how to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key - N0C KB\" \/>\n<meta property=\"og:description\" content=\"This article explains how to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/\" \/>\n<meta property=\"og:site_name\" content=\"N0C KB\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-21T19:55:54+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\\\/\",\"url\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\\\/\",\"name\":\"How to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key - N0C KB\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/#website\"},\"datePublished\":\"2024-02-15T00:26:43+00:00\",\"dateModified\":\"2026-07-21T19:55:54+00:00\",\"description\":\"This article explains how to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/kb.n0c.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Articles\",\"item\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/#website\",\"url\":\"https:\\\/\\\/kb.n0c.com\\\/\",\"name\":\"N0C KB\",\"description\":\"Official documentation of the N0C hosting platform\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kb.n0c.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key - N0C KB","description":"This article explains how to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/","og_locale":"en_US","og_type":"article","og_title":"How to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key - N0C KB","og_description":"This article explains how to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key.","og_url":"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/","og_site_name":"N0C KB","article_modified_time":"2026-07-21T19:55:54+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/","url":"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/","name":"How to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key - N0C KB","isPartOf":{"@id":"https:\/\/kb.n0c.com\/#website"},"datePublished":"2024-02-15T00:26:43+00:00","dateModified":"2026-07-21T19:55:54+00:00","description":"This article explains how to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key.","breadcrumb":{"@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/how-to-create-a-mysql-trigger-and-function-by-connecting-to-an-account-with-an-ssh-key\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/kb.n0c.com\/"},{"@type":"ListItem","position":2,"name":"Articles","item":"https:\/\/kb.n0c.com\/en\/knowledge-base\/"},{"@type":"ListItem","position":3,"name":"How to Create a MySQL Trigger and Function by Connecting to an Account with an SSH Key"}]},{"@type":"WebSite","@id":"https:\/\/kb.n0c.com\/#website","url":"https:\/\/kb.n0c.com\/","name":"N0C KB","description":"Official documentation of the N0C hosting platform","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.n0c.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb\/14917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/comments?post=14917"}],"version-history":[{"count":9,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb\/14917\/revisions"}],"predecessor-version":[{"id":23480,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb\/14917\/revisions\/23480"}],"wp:attachment":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/media?parent=14917"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb-category?post=14917"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=14917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}