{"id":383,"date":"2018-05-18T03:27:04","date_gmt":"2018-05-18T03:27:04","guid":{"rendered":"http:\/\/linuxresellerwebhosting.in\/blog\/?p=383"},"modified":"2018-05-20T03:30:10","modified_gmt":"2018-05-20T03:30:10","slug":"how-to-install-mysql-server-using-mysql-yum-repository","status":"publish","type":"post","link":"https:\/\/linuxresellerwebhosting.in\/blog\/how-to-install-mysql-server-using-mysql-yum-repository\/","title":{"rendered":"How to Install MySQL Server using MySQL Yum Repository"},"content":{"rendered":"<p>Hello,<\/p>\n<p>The\u00a0<a class=\"ulink\" href=\"http:\/\/dev.mysql.com\/downloads\/repo\/yum\/\" target=\"_top\" rel=\"noopener\">MySQL Yum repository<\/a>\u00a0for Oracle Linux, Red Hat Enterprise Linux, CentOS, and Fedora provides RPM packages for installing the MySQL server, client, MySQL Workbench, MySQL Utilities, MySQL Router, MySQL Shell, Connector\/ODBC, Connector\/Python and so on (not all packages are available for all the distributions<\/p>\n<p>Now let&#8217;s see how to do it.<\/p>\n<p>Step 1 ) Add the MySQL Yum repository to your system&#8217;s repository list.<\/p>\n<p>a) Go to the Download MySQL Yum Repository page (<a class=\"ulink\" href=\"http:\/\/dev.mysql.com\/downloads\/repo\/yum\/\" target=\"_top\" rel=\"noopener\">http:\/\/dev.mysql.com\/downloads\/repo\/yum\/<\/a>) in the MySQL Developer Zone.<\/p>\n<p>b) Select and download the release package for your machine.<\/p>\n<p>c) Install the downloaded release package with the following command<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">[root@vps ~]# yum localinstall downloaded_package.rpm<\/pre>\n<p>Step 2 ) You can verify whether MySQL yum repository is added to your local repository by issuing following the command.<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">[root@vps ~]# yum repolist enabled | grep \"mysql\"<\/pre>\n<p>Step 3 ) Within the MySQL Yum repository, different release series of the MySQL Community Server are hosted in different sub-repositories. you can also select a release series by editing manually the\u00a0<code class=\"filename\">\/etc\/yum.repos.d\/mysql-community.repo<\/code>\u00a0file. This is a typical entry for a release series&#8217; subrepository in the file:<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[mysql57-community]\r\nname=MySQL 5.7 Community Server\r\nbaseurl=http:\/\/repo.mysql.com\/yum\/mysql-5.7-community\/el\/6\/$basearch\/\r\nenabled=1\r\ngpgcheck=1\r\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-mysql<\/pre>\n<p>The typical MySQL sub-repositories show in above. You may find many sub-repositories within the MySQL yum repository. You can disable \/ enable the require sub repositories by changing &#8220;enabled&#8221; to 0 or 1.<\/p>\n<p>If you change to 1, It means that sub-repositories enabled. And 0 means disabled.<\/p>\n<p>Step 4 ) Installing MySQL.<\/p>\n<p>Install MySQL by the following command<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">[root@vps ~]# yum install mysql-community-server<\/pre>\n<p>Step 5 ) Start the MySQL server with the following command:<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">[root@vps ~]# systemctl start mysqld<\/pre>\n<p>You can check the status of the MySQL server with the following command:<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">[root@vps ~]# systemctl status mysqld<\/pre>\n<p>Step 6 ) Now you have to set root password MySQL. You can do it by issuing below command.<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">[root@vps ~]# mysqladmin -u root password 'new-password'<\/pre>\n<p>Now you can login to your MySQL server by the below command and then try your password.<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">[root@vps ~]# mysql -u root -p<\/pre>\n<p>&nbsp;<\/p>\n<p>Thanks for reading this tutorial \ud83d\ude42<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello, The\u00a0MySQL Yum repository\u00a0for Oracle Linux, Red Hat Enterprise Linux, CentOS, and Fedora provides RPM packages for installing the MySQL<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[1],"tags":[],"class_list":["post-383","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/comments?post=383"}],"version-history":[{"count":5,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/383\/revisions"}],"predecessor-version":[{"id":389,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/383\/revisions\/389"}],"wp:attachment":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/media?parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/categories?post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/tags?post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}