{"id":5223,"date":"2015-10-04T12:17:43","date_gmt":"2015-10-04T04:17:43","guid":{"rendered":"http:\/\/rmohan.com\/?p=5223"},"modified":"2015-10-04T12:17:43","modified_gmt":"2015-10-04T04:17:43","slug":"install-mariadb-on-centos-7","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5223","title":{"rendered":"Install MariaDB on CentOS 7"},"content":{"rendered":"<p>MySQL, MariaDB has been known to be a drop-in replacement that brings enhancements and performance optimizations over MySQL. This tutorial will show you how to install MariaDB onto CentOS 7 in two different ways.<\/p>\n<p>Step 1: Download\/install MariaDB<\/p>\n<p>Install from repository<br \/>\nMariaDB is shipped in the CentOS repo as of CentOS 7. Anything lower will need require you to add the additional repository to your server. Run the following command on your server:<\/p>\n<p>yum update -y<br \/>\nyum install mariadb-server<br \/>\nYou may also need to finish the installation by running:<\/p>\n<p>\/usr\/bin\/mysql_secure_installation<br \/>\nThis will install MariaDB and walk you through the process of setting up your root password.<\/p>\n<p>Manual install from MariaDB mirror (latest version)<br \/>\nThis should be straightforward. You will need to create a file in \/etc\/yum.repos.d\/and add the following:<\/p>\n<p>[mariadb]<br \/>\nname = MariaDB<br \/>\nbaseurl = http:\/\/yum.mariadb.org\/10.0\/centos7-amd64<br \/>\ngpgkey=https:\/\/yum.mariadb.org\/RPM-GPG-KEY-MariaDB<br \/>\ngpgcheck=1<br \/>\nOnce the file is created, run the following commands:<\/p>\n<p>yum update -y<br \/>\nyum install MariaDB-server MariaDB-client<br \/>\nYou can then finish the installation by running:<\/p>\n<p>\/usr\/bin\/mysql_secure_installation<br \/>\nIf everything was successful, proceed to the next step.<\/p>\n<p>Step 2: Verify that MariaDB is operational<\/p>\n<p>Depending on if you are using the default Vultr image of CentOS 7 or if you are using a Custom ISO, you may need to manually start MariaDB and enable it to start on boot of the server. To do so, run:<\/p>\n<p>systemctl start mariadb.service<br \/>\nsystemctl enable mariadb.service<br \/>\nYou can check to see if everything is running by executing the following command:<\/p>\n<p>systemctl is-active mariadb.service<br \/>\nAfter installation, run mysql -u root -p. Enter your password when prompted. You will see output similar to the following:<\/p>\n<p>Welcome to the MariaDB monitor.  Commands end with ; or \\g.<br \/>\nYour MariaDB connection id is XXXX<br \/>\nServer version: 5.5.X<\/p>\n<p>Copyright (c) 2000, 2014, Oracle, Monty Program 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)]><br \/>\nCongratulations, you have successfully installed MariaDB on CentOS 7<br \/>\nRead more at: https:\/\/www.vultr.com\/docs\/install-mariadb-on-centos-7<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL, MariaDB has been known to be a drop-in replacement that brings enhancements and performance optimizations over MySQL. This tutorial will show you how to install MariaDB onto CentOS 7 in two different ways.<\/p>\n<p>Step 1: Download\/install MariaDB<\/p>\n<p>Install from repository MariaDB is shipped in the CentOS repo as of CentOS 7. Anything lower will [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5223"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5223"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5223\/revisions"}],"predecessor-version":[{"id":5224,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5223\/revisions\/5224"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}