{"id":2826,"date":"2019-05-03T23:06:42","date_gmt":"2019-05-03T20:06:42","guid":{"rendered":"https:\/\/kifarunix.com\/?p=2826"},"modified":"2019-05-04T07:55:28","modified_gmt":"2019-05-04T04:55:28","slug":"install-mariadb-10-3-on-fedora-30","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-mariadb-10-3-on-fedora-30\/","title":{"rendered":"Install MariaDB 10.3 on Fedora 30"},"content":{"rendered":"\n<p>Welcome to our guide on how to install MariaDB 10.3 on Fedora 30. <a href=\"https:\/\/mariadb.org\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"MariaDB (opens in a new tab)\">MariaDB<\/a> is an open-source relational database which comes as an enhanced drop-in replacement for the famous MySQL. It is fast, robust and scalable with a rich ecosystem of storage engines, plugins etc making it very versatile for most use cases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install MariaDB 10.3 on Fedora 30<\/h2>\n\n\n\n<p>MariaDB 10.3 is the current stable release with MariaDb 10.4 being the latest release development version. Fedora 30 repos contains this current stable version of MariaDB and thus, you can simply install it via the DNF package manager.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install mariadb mariadb-server<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Dependencies resolved.\n=======================================================================================================================================================\n Package                                            Architecture              Version                                 Repository                  Size\n=======================================================================================================================================================\nInstalling:\n mariadb                                            x86_64                    3:10.3.12-10.fc30                       fedora                     6.0 M\n mariadb-server                                     x86_64                    3:10.3.12-10.fc30                       fedora                      17 M\n...<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Running MariaDB on Fedora 30<\/h2>\n\n\n\n<p>Once the installation is done, you can run by executing the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl start mariadb<\/code><\/pre>\n\n\n\n<p>To configure MariaDB to run on system boot;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl enable mariadb<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Initial MariaDB security<\/h2>\n\n\n\n<p>The install of MariaDB comes with a security script called <strong>mysql_secure_installation<\/strong>. This script is used to perform initial MariaDB security including setting up root password, remove default test databases, disabling root remote login, removing anonymous database users. This can be done by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql_secure_installation<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Set MariaDB root Password<\/h3>\n\n\n\n<p>When the script above runs, it first prompts you for the current root password. But since you just did the installation and no password set yet, press Enter to accept blank password. You will then be prompted to set root password.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\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: StrongPassWORD\nRe-enter new password: StrongPassWORD\n...<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Remove MariaDB anonymous user<\/h3>\n\n\n\n<p>By default, MariaDB usually has an anonymous user for testing purposes. Remove this user.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Remove anonymous users? [Y\/n] y\n ... Success!<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Disable Remote root Login<\/h3>\n\n\n\n<p>When prompted to disable remote root login to MariaDB, accept and proceed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Disallow root login remotely? [Y\/n] y\n ... Success!<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Remove MariaDB test Database<\/h3>\n\n\n\n<p>Remove test database and the privileges associated with it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Remove test database and access to it? [Y\/n] y\n - Dropping test database...\n ... Success!\n - Removing privileges on test database...\n ... Success!<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Reload the Privilege Tables<\/h3>\n\n\n\n<p>Reload the privilege tables to effect all the changes that have been made above.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Reload privilege tables now? [Y\/n] y\n ... Success!<\/code><\/pre>\n\n\n\n<p>That is, you MariaDB on Fedora 30 is installed and setup.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Test Connection.<\/h3>\n\n\n\n<p>Since you have disabled remote login for root user, you can test local connection as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p\nEnter password: StrongPassWORD\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 16\nServer version: 10.3.12-MariaDB MariaDB Server\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMariaDB [(none)]> <\/code><\/pre>\n\n\n\n<p>As you can see above, MariaDB version we are running is 10.3.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Welcome to the MariaDB monitor.  Commands end with ; or \\g.<br>Your MariaDB connection id is 16<br><strong>Server version: 10.3.12-MariaDB<\/strong> MariaDB Server<\/code><\/pre>\n\n\n\n<p>You can also check the version by logging to MariaDB as in above and running the query;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>select version();<br><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>MariaDB [(none)]> select version();\n+-----------------+\n| version()       |\n+-----------------+\n| 10.3.12-MariaDB |\n+-----------------+\n1 row in set (0.002 sec)<\/code><\/pre>\n\n\n\n<p>That is all about how to install MariaDB 10.3 on Fedora 30. Enjoy.<\/p>\n\n\n\n<p>You can also check out previous articles on Fedora 30\/29\/28;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/how-to-install-lamp-linux-apache-mysql-php-stack-on-fedora-28-29\/\" target=\"_blank\">How To Install LAMP (Linux, Apache, MySQL, PHP) Stack on Fedora 28\/29<\/a><\/li><li><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/how-to-install-lemp-nginxmariadbphp7-2-stack-on-fedora-28-fedora-29\/\" target=\"_blank\">How to Install LEMP (Nginx,MariaDB,PHP7.2) Stack on Fedora 28 \/ Fedora 29<\/a><\/li><li><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-apache-on-fedora-30\/\" target=\"_blank\">Install Apache on Fedora 30<\/a><\/li><li><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/remove-apache-test-page-on-fedora-30-29\/\" target=\"_blank\">Remove Apache Test Page on Fedora 30\/29<\/a><\/li><li><a href=\"https:\/\/kifarunix.com\/administer-fedora-30-29-from-web-using-cockpit\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Administer Fedora 30\/29 from Web using Cockpit<\/a><\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to our guide on how to install MariaDB 10.3 on Fedora 30. MariaDB is an open-source relational database which comes as an enhanced drop-in<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[299,928],"tags":[924,136,135],"class_list":["post-2826","post","type-post","status-publish","format-standard","hentry","category-database","category-mariadb","tag-fedora-30","tag-mariadb","tag-mysql","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2826"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=2826"}],"version-history":[{"count":2,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2826\/revisions"}],"predecessor-version":[{"id":2828,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2826\/revisions\/2828"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=2826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=2826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=2826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}