{"id":3463,"date":"2020-02-14T02:23:31","date_gmt":"2020-02-14T02:23:31","guid":{"rendered":"https:\/\/lamp.ciscoar.com\/?page_id=3463"},"modified":"2020-02-14T04:09:37","modified_gmt":"2020-02-14T04:09:37","slug":"mysql-mariadb-secure-installation","status":"publish","type":"page","link":"https:\/\/lamp.ciscoar.com\/?page_id=3463","title":{"rendered":"MySQL MariaDB secure installation"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Initializing MariaDB<\/h2>\n\n\n\n<p>The first thing you must do after a successful installation of MariaDB is to initialize it through a process called MySQL secure installation, see CLI command below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"vim\" class=\"language-vim\">mysql_secure_installation<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"504\" src=\"https:\/\/lamp.ciscoar.com\/wp-content\/uploads\/2020\/02\/mysql-secure-installation-mariadb.gif\" alt=\"\" class=\"wp-image-3467\"\/><figcaption>MariaDB secure installation<\/figcaption><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">MySQL Secure Installation log<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"rest\" class=\"language-rest\">mysql_secure_installation\n\nNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB\n      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!\n\nIn order to log into MariaDB to secure it, we'll need the current\npassword for the root user.  If you've just installed MariaDB, and\nyou haven't set the root password yet, the password will be blank,\nso you should just press enter here.\n\nEnter current password for root (enter for none): \nOK, successfully used password, moving on...\n\nSetting the root password ensures that nobody can log into the MariaDB\nroot user without the proper authorisation.\n\nSet root password? [Y\/n] Y\nNew password: \nRe-enter new password: \nPassword updated successfully!\nReloading privilege tables..\n ... Success!\n\n\nBy default, a MariaDB installation has an anonymous user, allowing anyone\nto log into MariaDB without having to have a user account created for\nthem.  This is intended only for testing, and to make the installation\ngo a bit smoother.  You should remove them before moving into a\nproduction environment.\n\nRemove anonymous users? [Y\/n] Y\n ... Success!\n\nNormally, root should only be allowed to connect from 'localhost'.  This\nensures that someone cannot guess at the root password from the network.\n\nDisallow root login remotely? [Y\/n] Y\n ... Success!\n\nBy default, MariaDB comes with a database named 'test' that anyone can\naccess.  This is also intended only for testing, and should be removed\nbefore moving into a production environment.\n\nRemove test database and access to it? [Y\/n] Y\n - Dropping test database...\n ... Success!\n - Removing privileges on test database...\n ... Success!\n\nReloading the privilege tables will ensure that all changes made so far\nwill take effect immediately.\n\nReload privilege tables now? [Y\/n] Y\n ... Success!\n\nCleaning up...\n\nAll done!  If you've completed all of the above steps, your MariaDB\ninstallation should now be secure.\n\nThanks for using MariaDB!\n\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Where to go next?<\/h2>\n\n\n\n<p>Completing this task was not only good for the security measures you&#8217;ve taken with the guidance of the script, you did also create a password for the MariaDB super user, I&#8217;m talking about the &#8220;root&#8221; account, you can now go ahead and login into the console for the first time.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"\/first-login-into-mariadb\/\">Accessing the MariaDB console for the first time<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Initializing MariaDB The first thing you must do after a successful installation of MariaDB is to initialize it through a process called MySQL secure installation, see CLI command below. MySQL Secure Installation log Where to go next? Completing this task was not only good for the security measures you&#8217;ve taken with the guidance of the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/lamp.ciscoar.com\/?page_id=3463\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;MySQL MariaDB secure installation&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3463","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=\/wp\/v2\/pages\/3463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3463"}],"version-history":[{"count":9,"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=\/wp\/v2\/pages\/3463\/revisions"}],"predecessor-version":[{"id":3501,"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=\/wp\/v2\/pages\/3463\/revisions\/3501"}],"wp:attachment":[{"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}