{"id":51438,"date":"2026-02-25T12:30:00","date_gmt":"2026-02-25T18:30:00","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=51438"},"modified":"2025-12-26T05:47:26","modified_gmt":"2025-12-26T11:47:26","slug":"how-to-reset-mariadb-root-password","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/","title":{"rendered":"How to Reset MariaDB Root Password"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password.webp\" alt=\"How to Reset MariaDB Root Password\" class=\"wp-image-51500\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password.webp 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password-300x169.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password-150x84.webp 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password-768x432.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>In this blog post, we will show you how to reset the MariaDB root password. We reset the MariaDB root password primarily because we forgot it, need to enhance security by changing it from a default\/weak one (or a randomly generated one we didn&#8217;t save), or after system changes like upgrades or migrations that might have altered credentials, allowing us to regain administrative control over our database. The process usually involves starting the server in a special mode that disables password checks (such as &#8211;skip-grant-tables), logging in as root without a password, and then issuing SQL commands to set a new, strong password.<\/p>\n\n\n\n<p>Resetting the MariaDB root password is a straightforward process that takes less than 5 minutes. Let&#8217;s get started!<\/p>\n\n\n\n<!--more-->\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69c4fff3e3b8d\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69c4fff3e3b8d\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#Step-1-Stop-the-MariaDB-database-server\" >Step 1. Stop the MariaDB database server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#Step-2-Start-the-MariaDB-server-with-the-%E2%80%9Cskip-grant-tables%E2%80%9D-option-in-safe-mode\" >Step 2. Start the MariaDB server with the \u201cskip-grant-tables\u201d option in safe mode<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#Step-3-Log-in-to-MariaDB-as-the-root-user\" >Step 3. Log in to MariaDB as the root user<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#Step-4-Reset-MariaDB-root-password\" >Step 4. Reset MariaDB root password<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#Step-5-Start-the-MariaDB-service\" >Step 5. Start the MariaDB service<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-prerequisites\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A <a href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/\">server running a Linux OS<\/a> distribution<\/li>\n\n\n\n<li>User privileges: root or non-root user with sudo privileges<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-1-stop-the-mariadb-database-server\"><span class=\"ez-toc-section\" id=\"Step-1-Stop-the-MariaDB-database-server\"><\/span>Step 1. Stop the MariaDB database server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Stopping the MariaDB database service differs between newer and older Linux OS distributions. Let&#8217;s see the differences:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> <strong>NEWER OS Distributions<\/strong>\n\n sudo systemctl stop mariadb\n\n ------------------------------\n\n <strong>OLDER OS Distributions<\/strong>\n\n sudo \/etc\/init.d\/mysql stop\n\n OR\n\n sudo \/etc\/init.d\/mysqld stop\n\n OR \n\n sudo \/etc\/init.d\/mariadb stop\n\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-2-start-the-mariadb-server-with-the-skip-grant-tables-option-in-safe-mode\"><span class=\"ez-toc-section\" id=\"Step-2-Start-the-MariaDB-server-with-the-%E2%80%9Cskip-grant-tables%E2%80%9D-option-in-safe-mode\"><\/span>Step 2. Start the MariaDB server with the \u201cskip-grant-tables\u201d option in safe mode<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>This option disables the permission system, allowing anyone to connect without a password. It should only be used for recovery in a secure, local environment. First, we have to create the <strong>\/var\/run\/mysqld\/<\/strong> directory with the correct permissions:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir \/var\/run\/mysqld\n\nchown -R mysql:mysql \/var\/run\/mysqld\/ \n<\/pre>\n\n\n\n<p>Since we already stopped the MariaDB service using the commands from the previous step, we can start the MariaDB service in safe mode:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysqld_safe --skip-grant-tables &amp;\n<\/pre>\n\n\n\n<p>This will disable the MariaDB authentication and <strong>&amp;<\/strong> run the process in the background.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-3-log-in-to-mariadb-as-the-root-user\"><span class=\"ez-toc-section\" id=\"Step-3-Log-in-to-MariaDB-as-the-root-user\"><\/span>Step 3. Log in to MariaDB as the root user<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now, we can log in to MariaDB without a root password:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#NEWER OS distributions\n\nmysql -u root -p\n\nOR \n\nmariadb -u root -p\n\n------------------------------------------------------------------------------\n\n#OLDER OS distributions\n\nmysql -u root -p\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-4-reset-mariadb-root-password\"><span class=\"ez-toc-section\" id=\"Step-4-Reset-MariaDB-root-password\"><\/span>Step 4. Reset MariaDB root password<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To reset the MariaDB root password, we can use the following commands, depending on whether we have a newer or older MariaDB version:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#NEWER MariaDB versions\n\nFLUSH PRIVILEGES;\nALTER USER 'root'@'localhost' IDENTIFIED BY 'YourNewStrongMySQLRootPassword';\nEXIT;\n\n------------------------------------------------------------------------------\n\n#OLDER MariaDB versions\n\nUPDATE user SET Password=PASSWORD('YourNewStrongMySQLRootPassword') WHERE User='root';\nFLUSH PRIVILEGES;\nEXIT;\n\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-5-start-the-mariadb-service\"><span class=\"ez-toc-section\" id=\"Step-5-Start-the-MariaDB-service\"><\/span>Step 5. Start the MariaDB service<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>After the password has been reset, start the MariaDB server in normal mode:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>NEWER OS Distributions<\/strong><br><br> sudo pkill -9 mariadb  # First kill all <strong>mariadb<\/strong> processes started before with --skip-grant-tables<br><br> sudo systemctl start mariadb<br><br> ----------------------------<br><br> <strong>OLDER OS Distributions<\/strong><br><br> sudo pkill -9 mysql  # First kill all <strong>mysql<\/strong> processes started before with --skip-grant-tables<br><br> sudo \/etc\/init.d\/mariadb start<br><br>  OR <br><br> sudo \/etc\/init.d\/mysql start<br><br>  OR<br> sudo \/etc\/init.d\/mysqld start<br><\/pre>\n\n\n\n<p>Now you can connect to MariaDB as a root user using the new password.<\/p>\n\n\n\n<p>Type \u201c<strong>mariadb -u root -p<\/strong>\u201d OR &#8220;<strong>mysql -u root -p<\/strong>&#8221; on older OS distributions in the terminal, and enter the new password you set in Step 4 when prompted.<\/p>\n\n\n\n<p>That\u2019s it all! You have learned how to reset MariaDB root password on different MariaDB versions.<\/p>\n\n\n\n<p>If you are one of our <a href=\"https:\/\/www.rosehosting.com\/mariadb-hosting\/\">MariaDB hosting<\/a> customers, you don\u2019t have to follow this tutorial and reset the MariaDB root password yourself. Our experienced Linux admins will do that for you. They are available 24\u00d77 and will address your request immediately. Submit a ticket.<\/p>\n\n\n\n<p>PS. If you liked this post, please share it with your friends or leave a comment below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog post, we will show you how to reset the MariaDB root password. We reset the MariaDB root &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Reset MariaDB Root Password\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#more-51438\" aria-label=\"Read more about How to Reset MariaDB Root Password\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":51500,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1702,1703],"tags":[41,2153,296,40,1740,65],"class_list":["post-51438","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-security","tag-database","tag-how-to-2","tag-mariadb","tag-reset-password","tag-root-password","tag-security","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Reset MariaDB Root Password | RoseHosting<\/title>\n<meta name=\"description\" content=\"Learn how to reset MariaDB root password quickly and easily with our step-by-step guide on securing your database.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Reset MariaDB Root Password\" \/>\n<meta property=\"og:description\" content=\"How to Reset MariaDB Root Password | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-25T18:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"576\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Reset MariaDB Root Password\",\"datePublished\":\"2026-02-25T18:30:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/\"},\"wordCount\":446,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password.webp\",\"keywords\":[\"database\",\"how to\",\"mariadb\",\"reset password\",\"root password\",\"security\"],\"articleSection\":[\"Databases\",\"Security\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/\",\"name\":\"How to Reset MariaDB Root Password | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password.webp\",\"datePublished\":\"2026-02-25T18:30:00+00:00\",\"description\":\"Learn how to reset MariaDB root password quickly and easily with our step-by-step guide on securing your database.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#primaryimage\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password.webp\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password.webp\",\"width\":1024,\"height\":576,\"caption\":\"How to Reset MariaDB Root Password\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Reset MariaDB Root Password\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Reset MariaDB Root Password | RoseHosting","description":"Learn how to reset MariaDB root password quickly and easily with our step-by-step guide on securing your database.","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:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/","og_locale":"en_US","og_type":"article","og_title":"How to Reset MariaDB Root Password","og_description":"How to Reset MariaDB Root Password | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2026-02-25T18:30:00+00:00","og_image":[{"width":1024,"height":576,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password.webp","type":"image\/webp"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Reset MariaDB Root Password","datePublished":"2026-02-25T18:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/"},"wordCount":446,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password.webp","keywords":["database","how to","mariadb","reset password","root password","security"],"articleSection":["Databases","Security"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/","name":"How to Reset MariaDB Root Password | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password.webp","datePublished":"2026-02-25T18:30:00+00:00","description":"Learn how to reset MariaDB root password quickly and easily with our step-by-step guide on securing your database.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password.webp","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2026\/02\/how-to-reset-mariadb-root-password.webp","width":1024,"height":576,"caption":"How to Reset MariaDB Root Password"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-reset-mariadb-root-password\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Reset MariaDB Root Password"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/51438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=51438"}],"version-history":[{"count":6,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/51438\/revisions"}],"predecessor-version":[{"id":51502,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/51438\/revisions\/51502"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/51500"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=51438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=51438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=51438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}