{"id":725,"date":"2020-10-21T16:28:14","date_gmt":"2020-10-21T16:28:14","guid":{"rendered":"https:\/\/linuxways.net\/?p=725"},"modified":"2020-11-13T21:54:29","modified_gmt":"2020-11-13T21:54:29","slug":"how-to-install-mariadb-on-linux-mint-20","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/mint\/how-to-install-mariadb-on-linux-mint-20\/","title":{"rendered":"How to install MariaDB on Linux Mint 20"},"content":{"rendered":"<h1><\/h1>\n<h1>Introduction:<\/h1>\n<p>MariaDB is a free and open-source relational database management system (DBMS) which is considered as a successor and replacement of MySQL DBMS. This DBMS is available for all three major operating systems i.e. Linux, macOS, and Windows. However, today\u2019s article will be focused on the installation of MariaDB on the Linux operating system.<\/p>\n<p><strong>Note: For showing you the process of installation of MariaDB, we have used Linux Mint 20. <\/strong><\/p>\n<h1>Method of Installing MariaDB on Linux:<\/h1>\n<p>For having MariaDB installed on your Linux Mint 20 system, the following steps should be performed in the order specified below:<\/p>\n<h2>Step # 1: Updating the Linux Mint 20 System\u2019s Cache:<\/h2>\n<p>Before installing MariaDB, we need to update our system\u2019s cache which can be done as follows:<\/p>\n<p>Click on the shortcut icon of the terminal present on your taskbar as highlighted in the image shown below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"231\" height=\"41\" class=\"wp-image-726\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-364.png\"><\/p>\n<p>The newly launched Linux Mint 20 terminal can also be seen in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"654\" height=\"98\" class=\"wp-image-727\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-365.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-365.png 654w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-365-300x45.png 300w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><\/p>\n<p>Now you can update your system\u2019s cache with the following command:<\/p>\n<pre><strong>sudo apt update<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"366\" height=\"25\" class=\"wp-image-728\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-366.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-366.png 366w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-366-300x20.png 300w\" sizes=\"auto, (max-width: 366px) 100vw, 366px\" \/><\/strong><\/p>\n<p>It will take a few seconds for the updating process to complete after which you will be given the control back to run the installation command as shown in the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"407\" class=\"wp-image-729\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-367.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-367.png 645w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-367-300x189.png 300w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/p>\n<h2>Step # 2: Installing MariaDB on Linux:<\/h2>\n<p>After updating your system, you can install MariaDB on it by running the command stated below:<\/p>\n<pre><strong>sudo apt install mariadb-server<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"496\" height=\"27\" class=\"wp-image-730\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-368.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-368.png 496w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-368-300x16.png 300w\" sizes=\"auto, (max-width: 496px) 100vw, 496px\" \/><\/strong><\/p>\n<p>You will be asked to confirm if you want to continue with the installation or not. You need to type \u201cY\u201d for carrying on as highlighted in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"363\" class=\"wp-image-731\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-369.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-369.png 622w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-369-300x175.png 300w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/p>\n<p>Once MariaDB has been successfully installed on your Linux Mint 20 system, you will be seeing the output shown in the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"647\" height=\"382\" class=\"wp-image-732\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-370.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-370.png 647w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-370-300x177.png 300w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/p>\n<h2>Step # 3: Verifying the Status of MariaDB:<\/h2>\n<p>After installing MariaDB, it starts running automatically, however, you can always verify it by checking its status by running the following command:<\/p>\n<pre><strong>sudo systemctl status mariadb<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"483\" height=\"24\" class=\"wp-image-733\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-371.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-371.png 483w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-371-300x15.png 300w\" sizes=\"auto, (max-width: 483px) 100vw, 483px\" \/><\/strong><\/p>\n<p>If MariaDB service will be currently running, then you will be able to see the \u201cactive (running)\u201d status as highlighted in the image shown below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"644\" height=\"411\" class=\"wp-image-734\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-372.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-372.png 644w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-372-300x191.png 300w\" sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><\/p>\n<h2>Step # 4: Checking the Version of MariaDB:<\/h2>\n<p>Additionally, you can also confirm the installation of MariaDB by checking its version by running the following command:<\/p>\n<pre><strong>sudo mysql \u2013v<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"351\" height=\"28\" class=\"wp-image-735\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-373.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-373.png 351w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-373-300x24.png 300w\" sizes=\"auto, (max-width: 351px) 100vw, 351px\" \/><\/strong><\/p>\n<p>The version of MariaDB installed on our Linux Mint 20 system is highlighted in the image shown below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"631\" height=\"209\" class=\"wp-image-736\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-374.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-374.png 631w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-374-300x99.png 300w\" sizes=\"auto, (max-width: 631px) 100vw, 631px\" \/><\/p>\n<h2>Step # 5: Securing MariaDB:<\/h2>\n<p>Up till now, MariaDB has been successfully installed on your Linux Mint 20 system. This step is optional, however, it is recommended that you secure your MariaDB by running the following command:<\/p>\n<pre><strong>sudo mysql_secure_installation<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"489\" height=\"25\" class=\"wp-image-737\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-375.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-375.png 489w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-375-300x15.png 300w\" sizes=\"auto, (max-width: 489px) 100vw, 489px\" \/><\/strong><\/p>\n<p>When you will run this command, you will be asked to enter the root password for MariaDB as shown in the image below. Since we have just installed MariaDB and have not set up a password for it yet, therefore, we can simply press the Enter key.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"610\" height=\"204\" class=\"wp-image-738\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-376.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-376.png 610w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-376-300x100.png 300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>After doing this, we will be asked if we want to set up a password or not. Press \u201cY\u201d over here for setting up a password as shown in the following image. Then you will be asked to enter a password of your choice.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"598\" height=\"297\" class=\"wp-image-739\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-377.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-377.png 598w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-377-300x149.png 300w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><\/p>\n<p>Once your password is set up, you will be asked if you want to remove the anonymous user (a user created by default) or not. It is recommended that you do so by pressing \u201cY\u201d as highlighted in the image shown below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"610\" height=\"411\" class=\"wp-image-740\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-378.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-378.png 610w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-378-300x202.png 300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>Then you will be asked if you want to disallow the access of MariaDB root remotely or not. You should press \u201cY\u201d over here for blocking remote access to MariaDB root for security purposes as shown in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"609\" height=\"406\" class=\"wp-image-741\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-379.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-379.png 609w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-379-300x200.png 300w\" sizes=\"auto, (max-width: 609px) 100vw, 609px\" \/><\/p>\n<p>There is also a default test database created which you should remove before using MariaDB. You can remove it by pressing \u201cY\u201d when asked to remove the test database as shown in the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"594\" height=\"409\" class=\"wp-image-742\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-380.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-380.png 594w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-380-300x207.png 300w\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" \/><\/p>\n<p>Finally, you will be asked to reload the privilege table by pressing \u201cY\u201d so that all the changes that you have made so far can take effect as shown in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"607\" height=\"410\" class=\"wp-image-743\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-381.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-381.png 607w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-381-300x203.png 300w\" sizes=\"auto, (max-width: 607px) 100vw, 607px\" \/><\/p>\n<p>Once the process of securing MariaDB is complete, you will be able to see this output on your terminal:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"409\" class=\"wp-image-744\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-382.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-382.png 580w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-382-300x212.png 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/p>\n<h2>Step # 6: Connecting to MariaDB:<\/h2>\n<p>For connecting to MariaDB, you can run the following command in your terminal:<\/p>\n<pre><strong>sudo mysql \u2013u root \u2013p<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"419\" height=\"26\" class=\"wp-image-745\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-383.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-383.png 419w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-383-300x19.png 300w\" sizes=\"auto, (max-width: 419px) 100vw, 419px\" \/><\/strong><\/p>\n<p>After executing this command, you will be asked to enter the root password that you have previously set up. Once you enter that password, you will see the MariaDB shell on your terminal as shown in the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"646\" height=\"215\" class=\"wp-image-746\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-384.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-384.png 646w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-384-300x100.png 300w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/p>\n<h1>Conclusion:<\/h1>\n<p>By following all the steps explained in this article, one can conveniently install, secure, and connect to MariaDB while using Linux Mint 20 within a few minutes. This DBMS can resultantly manage your databases very efficiently.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction: MariaDB is a free and open-source relational database management system (DBMS) which is considered as a successor and replacement of MySQL DBMS. This DBMS is available for&hellip;<\/p>","protected":false},"author":3,"featured_media":1587,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[41],"class_list":["post-725","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mint","tag-mariadb"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=725"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/725\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/1587"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}