{"id":66,"date":"2023-11-26T18:10:19","date_gmt":"2023-11-26T17:10:19","guid":{"rendered":"https:\/\/artheodoc.fr\/?page_id=66"},"modified":"2023-11-26T18:10:19","modified_gmt":"2023-11-26T17:10:19","slug":"securisation-de-linstallation-de-mariadb","status":"publish","type":"page","link":"https:\/\/artheodoc.fr\/index.php\/securisation-de-linstallation-de-mariadb\/","title":{"rendered":"S\u00e9curisation de l&rsquo;installation de MariaDB"},"content":{"rendered":"\n<p>L\u2019installation de MariaDB n\u2019est pas s\u00e9curis\u00e9e pour le moment. Le script mysql_secure_installation va nous permettre de rem\u00e9dier \u00e0 cela.<\/p>\n\n\n\n<p>On d\u00e9marre l\u2019ex\u00e9cution du script en administrateur root (su).<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>cd \/var\/lib\/mysql\/<\/strong><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">root@WordPress:\/var\/lib\/mysql# <strong>mysql_secure_installation<\/strong><\/pre>\n\n\n\n<p>1 \u2013 Le script demande le mot de passe root de MariaDB. Il n\u2019y en a pas pour le moment, on fait juste <strong>[Return]<\/strong>.<\/p>\n\n\n\n<p>2 &#8211; Commencez par r\u00e9ponse <strong>Y<\/strong> \u00e0 la question Switch to unix_socket authentication. Cela authorisera uniquement les connexions sur la base de donn\u00e9es MariaDB depuis votre serveur lui-m\u00eame.<\/p>\n\n\n\n<p>Attention&nbsp;: vous devrez r\u00e9pondre N si votre service PHP n&rsquo;est pas install\u00e9 sur le m\u00eame serveur que votre serveur MariaDB.<\/p>\n\n\n\n<p>Switch to unix_socket authentification [Y\/n] <strong>y<\/strong><\/p>\n\n\n\n<p>3 &#8211; Puis ensuite r\u00e9pondez <strong>Y<\/strong> \u00e0 la question suivante pour sp\u00e9cifier le mot de passe de l&rsquo;utilisateur root de MariaDB qui est diff\u00e9rent de l&rsquo;utilisateur root de votre Debian.<\/p>\n\n\n\n<p>Change the root Password&nbsp;? [Y\/n] <strong>y<\/strong><\/p>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color has-link-color wp-elements-a3dfeb6761a03f3ca2f4402591f31c38\"><em>New password:<\/em><\/p>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color has-link-color wp-elements-8078c858a9c059f197571510110949b9\"><em>Re-enter new password:<\/em><\/p>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color has-link-color wp-elements-b56418bed2b2dfcd81ee53cdaf8aef5c\"><em>Password updated successfully!<\/em><\/p>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color has-link-color wp-elements-24064941b4a3592cdd655edb3b61ccf5\"><em>Reloading privilege tables..<\/em><\/p>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color has-link-color wp-elements-580c5a8921a13b64ff047266ec407587\"><em>&#8230; Success!<\/em><\/p>\n\n\n\n<p>4 \u2013 Dans notre cas, nous allons supprimer le compte anonyme.<\/p>\n\n\n\n<p>Remove anonymous users? [Y\/n] <strong>y<\/strong><\/p>\n\n\n\n<p>5 \u2013 On peut restreindre l\u2019acc\u00e8s via le compte root aux clients qui se connectent depuis le serveur uniquement. Cela emp\u00eache la prise de contr\u00f4le \u00e0 distance de votre base de donn\u00e9es.<\/p>\n\n\n\n<p>Disallow root login remotely? [Y\/n] <strong>y<\/strong><\/p>\n\n\n\n<p>6 \u2013 je choisis de supprimer le sch\u00e9ma test qui est cr\u00e9\u00e9 par d\u00e9faut.<\/p>\n\n\n\n<p>Remove test database and access to it? [Y\/n] <strong>y<\/strong><\/p>\n\n\n\n<p>7 \u2013 Fin de l\u2019op\u00e9ration, on recharge la table des privil\u00e8ges pour qu\u2019ils soient pris en compte. L\u2019installation est s\u00e9curis\u00e9e.<\/p>\n\n\n\n<p>Reload privilege tables now? [Y\/n] <strong>y<\/strong><\/p>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color has-link-color wp-elements-580c5a8921a13b64ff047266ec407587\"><em>&#8230; Success!<\/em><\/p>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color has-link-color wp-elements-da4d1c6be97563bb7d3eadd4103a794a\"><em>Cleaning up&#8230;<\/em><\/p>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color has-link-color wp-elements-77f0380243cc1b97ce60b24c37f1085f\"><em>All done! If you&rsquo;ve completed all of the above steps, your MariaDB<\/em><\/p>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color has-link-color wp-elements-2612f9e61927311d15379b95ecb4a577\"><em>installation should now be secure.<\/em><\/p>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color has-link-color wp-elements-8231ea6aab1670904bb2f9a6213c7245\"><em>Thanks for using MariaDB!<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>L\u2019installation de MariaDB n\u2019est pas s\u00e9curis\u00e9e pour le moment. Le script mysql_secure_installation va nous permettre de rem\u00e9dier \u00e0 cela. On d\u00e9marre l\u2019ex\u00e9cution du script en administrateur root (su). cd \/var\/lib\/mysql\/ root@WordPress:\/var\/lib\/mysql# mysql_secure_installation 1 \u2013 Le script demande le mot de passe root de MariaDB. Il n\u2019y en a pas pour le moment, on fait juste [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","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":""},"class_list":["post-66","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/pages\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/types\/page"}],"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=66"}],"version-history":[{"count":1,"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/pages\/66\/revisions"}],"predecessor-version":[{"id":67,"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/pages\/66\/revisions\/67"}],"wp:attachment":[{"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/media?parent=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}