{"id":13960,"date":"2021-05-11T10:37:59","date_gmt":"2021-05-11T09:37:59","guid":{"rendered":"https:\/\/www.oderland.se\/support\/artikel\/kan-ni-aktivera-event_scheduler-i-mysql\/"},"modified":"2026-02-05T13:22:23","modified_gmt":"2026-02-05T12:22:23","slug":"can-you-activate-event_scheduler-in-mysql","status":"publish","type":"ht_kb","link":"https:\/\/www.oderland.se\/support\/en\/artikel\/can-you-activate-event_scheduler-in-mysql\/","title":{"rendered":"Can you activate event_scheduler in MariaDB?"},"content":{"rendered":"\n<p>Due to security concerns, we cannot activate event_scheduler in MariaDB on our web hosting account servers. Therefore, you cannot set up eventes in MariaDB.<\/p>\n\n\n\n<p>Instead, we recommend that you use <a rel=\"noreferrer noopener\" href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-set-up-cron-jobs\/\" target=\"_blank\">cron jobs<\/a> set up on the server.<\/p>\n\n\n\n<p>When you create the cron job, you could use a command like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mariadb -h localhost -u <code>DATABASE_USER<\/code> -p <code>PASSSWORD<\/code> -D <code>DATABASE_NAME<\/code> -e \"<code>QUERY<\/code>\"<\/pre>\n\n\n\n<p>It is wise to <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-create-databases-via-cpanel\/#creating-a-database-user\" target=\"_blank\" rel=\"noreferrer noopener\">create a separate MariaDB user<\/a> for this, and then <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-create-databases-via-cpanel\/#add-a-user-to-a-database\" target=\"_blank\" rel=\"noreferrer noopener\">connect that new user to the database<\/a>. Remember to swap out <code>DATABASE_USER<\/code>, <code>PASSWORD<\/code>, <code>DATABASE_NAME<\/code>, and <code>QUERY<\/code> in the command above.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">If you have no alternatives to running events directly via MariaDB, you need to set up a server via <a href=\"https:\/\/www.oderland.com\/cloud\/\" target=\"_blank\" rel=\"noreferrer noopener\">Oderland Cloud<\/a>. There, you can set up MySQL (and other software) in any way you want. If you have a <a href=\"https:\/\/www.oderland.com\/servers\/\" target=\"_blank\" rel=\"noreferrer noopener\">Managed Server<\/a>, we can help you activate event_scheduler.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Due to security concerns, we cannot activate event_scheduler in MariaDB on our web hosting account servers. Therefore, you cannot set up eventes in MariaDB. Instead, we recommend that you use cron jobs set up on the server. When you create the cron job, you could use a command like this:&#8230;<\/p>\n","protected":false},"author":12,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"ht-kb-category":[197],"ht-kb-tag":[],"class_list":["post-13960","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-databases"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/13960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/comments?post=13960"}],"version-history":[{"count":6,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/13960\/revisions"}],"predecessor-version":[{"id":24782,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/13960\/revisions\/24782"}],"wp:attachment":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/media?parent=13960"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb-category?post=13960"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=13960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}