{"id":3069,"date":"2018-11-11T23:45:58","date_gmt":"2018-11-11T23:45:58","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=3069"},"modified":"2018-11-12T02:46:19","modified_gmt":"2018-11-12T02:46:19","slug":"how-to-install-mariadb-on-ubuntu-16-04","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/11\/11\/how-to-install-mariadb-on-ubuntu-16-04\/","title":{"rendered":"How to Install MariaDB on Ubuntu 16.04"},"content":{"rendered":"<p><a href=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/How-to-install-MariaDB-on-Ubuntu-16.04.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/How-to-install-MariaDB-on-Ubuntu-16.04.jpg\" alt=\"How to install MariaDB on Ubuntu 16.04\" width=\"742\" height=\"372\" \/><\/a><\/p>\n<p>How to install MariaDB on Ubuntu 16.04<\/p>\n<p><a href=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/installing-mariadb-on-ubuntu-16.04.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/installing-mariadb-on-ubuntu-16.04.jpg\" alt=\"installing mariadb on ubuntu 16.04\" width=\"150\" height=\"100\" \/><\/a>MariaDB is a community-developed fork of MySQL. It is a free and open source, very fast, stable and scalable database server, which makes it one of the most used database servers in the world. It is an improved, drop-in replacement for popular MySQL Database Server. In this tutorial, we will show you how to install MariaDB on Ubuntu 16.04. Installing MariaDB on Ubuntu 16.04 is an easy task, and if you carefully follow the steps of this tutorial, you should have it installed on your system in less than 10 minutes. Let\u2019s get started.<\/p>\n<h2>1. Connect to your server<\/h2>\n<p>First, you will need to login to your server via SSH as user root:<\/p>\n<p>ssh root@IP_ADDRESS -p PORT_NUMBER<\/p>\n<p>and replace \u201cIP_ADDRESS\u201d and \u201cPORT_NUMBER\u201d with your actual server IP address and SSH port number.<\/p>\n<h2>2. Update your system<\/h2>\n<p>Before we start, let\u2019s make sure your system is up-to-date by running the following commands:<\/p>\n<p>apt-get update<br \/>\napt-get upgrade<\/p>\n<h2>3. Install MariaDB on Ubuntu 16.04<\/h2>\n<p>Before we start with the MariaDB Server installation, you will need to add the official MariaDB repository.<\/p>\n<p>First, install the software-properties-common package to your server with the following command:<\/p>\n<p>apt-get install software-properties-common<\/p>\n<p>Next, import the MariaDB GnuPG signing key to your system, by executing the following command:<\/p>\n<p>apt-key adv &#8211;recv-keys &#8211;keyserver hkp:\/\/keyserver.ubuntu.com:80 0xF1656F24C74CD1D8<\/p>\n<p>And finally, add the MariaDB repository with:<\/p>\n<p>add-apt-repository &#8216;deb [arch=amd64,arm64,i386,ppc64el] http:\/\/mirror.nodesdirect.com\/mariadb\/repo\/10.3\/ubuntu xenial main&#8217;<\/p>\n<p>To be able to initiate the MariaDB installation from the newly added repository, you will now need to update the package list with:<\/p>\n<p>apt-get update<\/p>\n<p>You can now install MariaDB on your server with:<\/p>\n<p>apt-get install mariadb-server<\/p>\n<p>Once the installation is complete, the MariaDB service will be started automatically. To verify if the service is running on your system, you can run the following command:<\/p>\n<p>systemctl status mariadb<\/p>\n<p>You should see the following output on your screen:<\/p>\n<p>\u25cf mariadb.service &#8211; MariaDB 10.3.10 database server<br \/>\nLoaded: loaded (\/lib\/systemd\/system\/mariadb.service; enabled; vendor preset: enabled)<br \/>\nDrop-In: \/etc\/systemd\/system\/mariadb.service.d<br \/>\n\u2514\u2500migrated-from-my.cnf-settings.conf<br \/>\nActive: active (running) since Sat 2018-10-27 13:37:11 CDT; 1h 3min ago<br \/>\nDocs: man:mysqld(8)<br \/>\nhttps:\/\/mariadb.com\/kb\/en\/library\/systemd\/<br \/>\nMain PID: 15152 (mysqld)<br \/>\nStatus: &#8220;Taking your SQL requests now&#8230;&#8221;<br \/>\nCGroup: \/system.slice\/mariadb.service<br \/>\n\u2514\u250015152 \/usr\/sbin\/mysqld<\/p>\n<p>And to check the MariaDB version you can type:<\/p>\n<p>mysql -V<br \/>\nmysql Ver 15.1 Distrib 10.3.10-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2<\/p>\n<h2>4. Securing your MariaDB installation<\/h2>\n<p>After the installation is complete, you can improve the security of your MariaDB server, by running the mysql_secure_installation script, using the following command:<\/p>\n<p>mysql_secure_installation<\/p>\n<p>You will be asked to enter your current password for the MariaDB root user. If you did not set any password during the installation, you can just leave it blank and press Enter:<\/p>\n<p>In order to log into MariaDB to secure it, we&#8217;ll need the current<br \/>\npassword for the root user. If you&#8217;ve just installed MariaDB, and<br \/>\nyou haven&#8217;t set the root password yet, the password will be blank,<br \/>\nso you should just press enter here.<\/p>\n<p>Enter current password for root (enter for none):<\/p>\n<p>You can then choose to change your root password or leave it as it is.<\/p>\n<p>Setting the root password ensures that nobody can log into the MariaDB<br \/>\nroot user without the proper authorisation.<\/p>\n<p>You already have a root password set, so you can safely answer &#8216;n&#8217;.<\/p>\n<p>Change the root password? [Y\/n]<\/p>\n<p>After this, you will get asked a couple of more questions and it is recommended that you answer \u2018yes\u2019 to all of them:<\/p>\n<p>Remove anonymous users? [Y\/n]<\/p>\n<p>Disallow root login remotely? [Y\/n]<\/p>\n<p>Remove test database and access to it? [Y\/n]<\/p>\n<p>Reload privilege tables now? [Y\/n]<\/p>\n<p>Once you complete all the steps, the following output will be displayed on your screen:<\/p>\n<p>All done! If you&#8217;ve completed all of the above steps, your MariaDB<br \/>\ninstallation should now be secure.<\/p>\n<p>Thanks for using MariaDB!<\/p>\n<h2>5. Connect to MariaDB<\/h2>\n<p>Now after you are done with installing and securing MariaDB, you can type the following command to connect to your MariaDB server:<\/p>\n<p>mysql -u root -p<\/p>\n<p>You will be asked for your MariaDB root password that has been set during the installation or during the mysql_secure_installation script.<\/p>\n<p>This will grant you access to the MariaDB shell:<\/p>\n<p>Welcome to the MariaDB monitor. Commands end with ; or g.<br \/>\nYour MariaDB connection id is 21<br \/>\nServer version: 10.3.10-MariaDB-1:10.3.10+maria~xenial-log mariadb.org binary distribution<\/p>\n<p>Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.<\/p>\n<p>Type &#8216;help;&#8217; or &#8216;h&#8217; for help. Type &#8216;c&#8217; to clear the current input statement.<\/p>\n<p>MariaDB [(none)]&gt;<\/p>\n<p><a href=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/install-mariadb-on-ubuntu-16.04.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/10\/install-mariadb-on-ubuntu-16.04.jpg\" alt=\"install mariadb on ubuntu 16.04\" width=\"150\" height=\"100\" \/><\/a>Of course, you don\u2019t have to install MariaDB on Ubuntu 16.04, if you use one of our <a href=\"https:\/\/www.rosehosting.com\/mariadb-hosting.html\">MariaDB Hosting services<\/a>, in which case you can simply ask our expert Linux admins to install and configure MariaDB for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n<p>PS. If you liked this post on how to install MariaDB on Ubuntu 16.04, please share it with your friends on the social networks using the buttons below or simply leave a reply. Thanks.<\/p>\n<p><a href=\"http:\/\/lxer.com\/module\/newswire\/ext_link.php?rid=262764\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to install MariaDB on Ubuntu 16.04 MariaDB is a community-developed fork of MySQL. It is a free and open source, very fast, stable and scalable database server, which makes it one of the most used database servers in the world. It is an improved, drop-in replacement for popular MySQL Database Server. In this tutorial, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/11\/11\/how-to-install-mariadb-on-ubuntu-16-04\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Install MariaDB on Ubuntu 16.04&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3069","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/3069","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=3069"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/3069\/revisions"}],"predecessor-version":[{"id":3272,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/3069\/revisions\/3272"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=3069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=3069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=3069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}