{"id":1691,"date":"2016-03-30T19:35:39","date_gmt":"2016-03-30T23:35:39","guid":{"rendered":"http:\/\/blog-dev.bezko.xyz\/?p=1691"},"modified":"2018-01-12T14:11:13","modified_gmt":"2018-01-12T19:11:13","slug":"how-to-install-mysql-mariadb-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/","title":{"rendered":"How To Install MySQL \/ MariaDB on CentOS 7"},"content":{"rendered":"<h1>How To Install MySQL \/ MariaDB on CentOS 7<\/h1>\n<p>CentOS 7 does not use the regular Oracle MySQL when installing from yum. Instead, it installs a fork called MariaDB. For most users, this is not an issue as it offers a very similar feature set to the current MySQL releases. However, if you would prefer to install the MySQL as offered by Oracle, you will need to use the official MySQL repository. You can find the knowledge base for oracle MySQL here. However, this guide will show you how to install MariaDB, the default MySQL version for CentOS 7.<\/p>\n<h2>GETTING STARTED<\/h2>\n<p>To complete this guide, you will need the following:<br \/>\n\u2022 1 Node (<a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\" target=\"_blank\">Cloud Server<\/a> or <a href=\"http:\/\/www.globo.tech\/dedicated-server-hosting\" target=\"_blank\">Dedicated Servers<\/a>) with CentOS 7 installed<\/p>\n<h2>Install MySQL \/ MariaDB<\/h2>\n<p>First, you need to install the package. As said previously, writing MySQL in yum will redirect to the MariaDB packages. However, this will only install the client and not the server. This is not what we want, so we need to specify the proper package names.<\/p>\n<p><code>yum install \u2013y mariadb mariadb-server<\/code><\/p>\n<p>Once this is installed, you will want to start it.<\/p>\n<p><code>systemctl start mariadb<\/code><\/p>\n<p>To enable it at startup, run this command:<\/p>\n<p><code>systemctl enable mariadb<\/code><\/p>\n<p>Now that we have the server running, we will want to secure it. We can do so by running the secure installation script.<\/p>\n<p><code>mysql_secure_installation<\/code><\/p>\n<p>Here, you will want to set a root password. It is then recommended to remove anonymous users, disallow remote root login, remove the test database and reload the privileges table.<\/p>\n<p>You can now login in command line with the regular MySQL login command:<\/p>\n<p><code>mysql \u2013u root -p<\/code><\/p>\n<h2>CONCLUSION<\/h2>\n<p>Maria DB is now setup for production and fully working. You can start using it with most applications that are compatible with MySQL as a database backend. If this guide was helpful to you, kindly share it with others who may also be interested. <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>How To Install MySQL \/ MariaDB on CentOS 7 CentOS 7 does not use the regular Oracle MySQL when installing from yum. Instead, it installs a fork called MariaDB. For most users, this is not an issue as it offers a very similar feature set to the current MySQL releases. However, if you would prefer<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61,50],"tags":[],"class_list":["post-1691","post","type-post","status-publish","format-standard","hentry","category-database","category-tutorials","operating_system-centos-7"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Install MySQL \/ MariaDB on CentOS 7 - Globo.Tech<\/title>\n<meta name=\"description\" content=\"This tutorial will show you how to install MySQL &amp; MariaDB on your CentOS 7 server. Read now &amp; Try this popular database management system !\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Install MySQL \/ MariaDB on CentOS 7 - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"This tutorial will show you how to install MySQL &amp; MariaDB on your CentOS 7 server. Read now &amp; Try this popular database management system !\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-30T23:35:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-12T19:11:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"963\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/\",\"name\":\"How To Install MySQL \/ MariaDB on CentOS 7 - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\"},\"datePublished\":\"2016-03-30T23:35:39+00:00\",\"dateModified\":\"2018-01-12T19:11:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"This tutorial will show you how to install MySQL & MariaDB on your CentOS 7 server. Read now & Try this popular database management system !\",\"breadcrumb\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.globo.tech\/learning-center\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Install MySQL \/ MariaDB on CentOS 7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\/\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Install MySQL \/ MariaDB on CentOS 7 - Globo.Tech","description":"This tutorial will show you how to install MySQL & MariaDB on your CentOS 7 server. Read now & Try this popular database management system !","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/","og_locale":"en_US","og_type":"article","og_title":"How To Install MySQL \/ MariaDB on CentOS 7 - Globo.Tech","og_description":"This tutorial will show you how to install MySQL & MariaDB on your CentOS 7 server. Read now & Try this popular database management system !","og_url":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/","og_site_name":"Globo.Tech","article_published_time":"2016-03-30T23:35:39+00:00","article_modified_time":"2018-01-12T19:11:13+00:00","og_image":[{"width":1920,"height":963,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png","type":"image\/png"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/","url":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/","name":"How To Install MySQL \/ MariaDB on CentOS 7 - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-03-30T23:35:39+00:00","dateModified":"2018-01-12T19:11:13+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"This tutorial will show you how to install MySQL & MariaDB on your CentOS 7 server. Read now & Try this popular database management system !","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-mariadb-on-centos-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"How To Install MySQL \/ MariaDB on CentOS 7"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/1691","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=1691"}],"version-history":[{"count":7,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/1691\/revisions"}],"predecessor-version":[{"id":4088,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/1691\/revisions\/4088"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=1691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=1691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=1691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}