{"id":2942,"date":"2026-02-27T18:35:32","date_gmt":"2026-02-27T17:35:32","guid":{"rendered":"https:\/\/artheodoc.fr\/?p=2942"},"modified":"2026-02-27T18:35:32","modified_gmt":"2026-02-27T17:35:32","slug":"definir-un-mot-de-passe-root-sur-une-installation-de-mariadb","status":"publish","type":"post","link":"https:\/\/artheodoc.fr\/index.php\/2026\/02\/27\/definir-un-mot-de-passe-root-sur-une-installation-de-mariadb\/","title":{"rendered":"D\u00e9finir un mot de passe root sur une installation de MariaDB"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Exemple sous Debian 13<\/h2>\n\n\n\n<p>En administrateur root (<strong>su<\/strong>)&nbsp;:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql -u root<\/pre>\n\n\n\n<p><em>Cela vous connectera \u00e0 MariaDB en tant qu\u2019utilisateur root sans mot de passe si il n&rsquo;a pas \u00e9t\u00e9 cr\u00e9\u00e9.<\/em><\/p>\n\n\n\n<p>D\u00e9finissez un mot de passe pour l\u2019utilisateur root&nbsp;:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ALTER USER 'root'@'localhost' IDENTIFIED BY 'votre_nouveau_mot_de_passe';<br>FLUSH PRIVILEGES;<br>EXIT;<\/pre>\n\n\n\n<p>V\u00e9rifiez la connexion avec le nouveau mot de passe&nbsp;:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql -u root -p<\/pre>\n\n\n\n<p><em>Vous serez invit\u00e9 \u00e0 entrer le mot de passe que vous venez de d\u00e9finir.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">(Optionnel) S\u00e9curisez davantage votre installation<\/h2>\n\n\n\n<p>Si vous souhaitez renforcer la s\u00e9curit\u00e9, vous pouvez ex\u00e9cuter la commande suivante pour lancer le script de s\u00e9curisation de MariaDB si il est disponible sur votre installation&nbsp;:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql_secure_installation<\/pre>\n\n\n\n<p><em>Ce script vous guidera pour supprimer les utilisateurs anonymes, d\u00e9sactiver la connexion root \u00e0 distance, et supprimer la base de test.<\/em><\/p>\n\n\n\n<p><a href=\"https:\/\/artheodoc.fr\/index.php\/securisation-de-linstallation-de-mariadb\/\" data-type=\"page\" data-id=\"66\" target=\"_blank\" rel=\"noreferrer noopener\">S\u00e9curisation de l&rsquo;installation de MariaDB<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exemple sous Debian 13 En administrateur root (su)&nbsp;: mysql -u root Cela vous connectera \u00e0 MariaDB en tant qu\u2019utilisateur root sans mot de passe si il n&rsquo;a pas \u00e9t\u00e9 cr\u00e9\u00e9. D\u00e9finissez un mot de passe pour l\u2019utilisateur root&nbsp;: ALTER USER &lsquo;root&rsquo;@&rsquo;localhost&rsquo; IDENTIFIED BY &lsquo;votre_nouveau_mot_de_passe&rsquo;;FLUSH PRIVILEGES;EXIT; V\u00e9rifiez la connexion avec le nouveau mot de passe&nbsp;: mysql [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2942","post","type-post","status-publish","format-standard","hentry","category-non-classe"],"_links":{"self":[{"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/posts\/2942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/comments?post=2942"}],"version-history":[{"count":1,"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/posts\/2942\/revisions"}],"predecessor-version":[{"id":2943,"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/posts\/2942\/revisions\/2943"}],"wp:attachment":[{"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/media?parent=2942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/categories?post=2942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/tags?post=2942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}