{"id":57,"date":"2018-04-24T05:42:35","date_gmt":"2018-04-24T05:42:35","guid":{"rendered":"http:\/\/td_uid_8_5adec3cbeaab1"},"modified":"2018-06-01T10:11:58","modified_gmt":"2018-06-01T10:11:58","slug":"how-to-install-mysql-on-centos-7","status":"publish","type":"post","link":"https:\/\/forumweb.hosting\/blog\/how-to-install-mysql-on-centos-7\/","title":{"rendered":"How to Install MySQL on CentOS 7"},"content":{"rendered":"<p>MySQL is a free and open source software used to manage databases on a computer. MySQL can be installed on many different operating system platforms such as Windows, Linux and Mac OS X. In this article, we will guide you to install MySQL in CentOS 7 using command line on server.<\/p>\n<p>What you need to prepare before installing:<br \/>\n&#8211; Root access to your server.<br \/>\n&#8211; CentOS 7 was installed on your server.<\/p>\n<p><strong>Step 1 &#8211; Download and prepare the MySQL repository<\/strong><\/p>\n<p>To start, you should connect to your server via SSH and prepare the commands below for use in the command line.<\/p>\n<p>First, you need to check if the system is up-to-date and up-to-date if needed. Type the following command:<\/p>\n<blockquote class=\"td_quote_box td_box_left\"><p>sudo yum update<\/p><\/blockquote>\n<p>Waiting for system updates. Then install MySQL repositories. You can find the latest version here: https:\/\/dev.mysql.com\/downloads\/repo\/yum\/). Type the following command:<\/p>\n<blockquote class=\"td_quote_box td_box_left\"><p>wget http:\/\/mysql.com\/get_mysql57-community-release-el7-9.noarch.rpm<\/p><\/blockquote>\n<p>Once loaded, you will see that the .rpm file has been saved.<\/p>\n<p><a href=\"https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/1-How-to-Install-MySQL-on-CentOS-7.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-545 size-medium\" src=\"https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/1-How-to-Install-MySQL-on-CentOS-7-300x119.jpg\" alt=\"\" width=\"300\" height=\"119\" srcset=\"https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/1-How-to-Install-MySQL-on-CentOS-7-300x119.jpg 300w, https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/1-How-to-Install-MySQL-on-CentOS-7-768x306.jpg 768w, https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/1-How-to-Install-MySQL-on-CentOS-7-1024x407.jpg 1024w, https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/1-How-to-Install-MySQL-on-CentOS-7-696x277.jpg 696w, https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/1-How-to-Install-MySQL-on-CentOS-7.jpg 1033w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Now you can prepare the repository and install MySQL packages from it. Type the command:<\/p>\n<blockquote class=\"td_quote_box td_box_left\"><p>sudo rpm -Uvh mysql57-community-release-el7-9.noarch.rpm<\/p><\/blockquote>\n<p>You will likely see the same result:<\/p>\n<p><a href=\"https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/2-How-to-Install-MySQL-on-CentOS-7.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-546 size-medium\" src=\"https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/2-How-to-Install-MySQL-on-CentOS-7-300x54.jpg\" alt=\"\" width=\"300\" height=\"54\" srcset=\"https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/2-How-to-Install-MySQL-on-CentOS-7-300x54.jpg 300w, https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/2-How-to-Install-MySQL-on-CentOS-7-768x138.jpg 768w, https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/2-How-to-Install-MySQL-on-CentOS-7-696x125.jpg 696w, https:\/\/forumweb.hosting\/blog\/wp-content\/uploads\/2018\/04\/2-How-to-Install-MySQL-on-CentOS-7.jpg 885w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>When you see that it reaches 100%, you will be able to start installing MySQL CentOS 7. Detailed instructions will be in the next step.<\/p>\n<p><strong>Step 2 &#8211; Install MySQL on the server<\/strong><\/p>\n<p>Now you can install MySQL right from this command line:<\/p>\n<blockquote class=\"td_quote_box td_box_left\"><p>sudo yum install mysql-server<\/p><\/blockquote>\n<p>A list of files will be given and you will receive a confirmation message to download them. Type y, and then press ENTER to continue.<\/p>\n<blockquote class=\"td_quote_box td_box_left\"><p># yum install mysql-server<br \/>\nLoaded plugins: fastestmirror, security<br \/>\nSetting up Install Process<br \/>\nDetermining fastest mirrors<br \/>\nepel\/metalink | 3.7 kB 00:00<br \/>\n* epel: fedora.mirror.serversaustralia.com.au<br \/>\nbase | 3.7 kB 00:00<br \/>\nepel | 4.7 kB 00:00<br \/>\nepel\/primary_db | 6.0 MB 00:00<br \/>\nextras | 3.4 kB 00:00<br \/>\nupdates | 3.4 kB 00:00<br \/>\nupdates\/primary_db | 8.1 MB 00:03 &#8230;<br \/>\nResolving Dependencies<br \/>\n&#8211;&gt; Running transaction check<br \/>\n&#8212;&gt; Package mysql-server.x86_64 0:5.1.73-8.el6_8 will be installed<br \/>\n&#8211;&gt; Processing Dependency: mysql = 5.1.73-8.el6_8 for package: mysql-server-5.1. 73-8.el6_8.x86_64<br \/>\n&#8211;&gt; Processing Dependency: perl-DBI for package: mysql-server-5.1.73-8.el6_8.x86 _64<br \/>\n&#8211;&gt; Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.73-8.el6 _8.x86_64<br \/>\n&#8211;&gt; Processing Dependency: perl(DBI) for package: mysql-server-5.1.73-8.el6_8.x8 6_64<br \/>\n&#8211;&gt; Running transaction check<br \/>\n&#8212;&gt; Package mysql.x86_64 0:5.1.73-8.el6_8 will be installed<br \/>\n&#8212;&gt; Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed<br \/>\n&#8212;&gt; Package perl-DBI.x86_64 0:1.609-4.el6 will be installed<br \/>\n&#8211;&gt; Finished Dependency Resolution<\/p>\n<p>Dependencies Resolved<\/p>\n<p>================================================================================<br \/>\nPackage Arch Version Repository Size<br \/>\n================================================================================<br \/>\nInstalling:<br \/>\nmysql-server x86_64 5.1.73-8.el6_8 base 8.6 M<br \/>\nInstalling for dependencies:<br \/>\nmysql x86_64 5.1.73-8.el6_8 base 895 k<br \/>\nperl-DBD-MySQL x86_64 4.013-3.el6 base 134 k<br \/>\nperl-DBI x86_64 1.609-4.el6 base 705 k<\/p>\n<p>Transaction Summary<br \/>\n================================================================================<br \/>\nInstall 4 Package(s)<\/p>\n<p>Total download size: 10 M<br \/>\nInstalled size: 29 M<br \/>\nIs this ok [y\/N]: y<\/p><\/blockquote>\n<p>You will see the download process as follows:<\/p>\n<blockquote class=\"td_quote_box td_box_left\"><p>Downloading Packages:<br \/>\n(1\/4): mysql-5.1.73-8.el6_8.x86_64.rpm | 895 kB 00:00 &#8230;<br \/>\n(2\/4): mysql-server-5.1.73-8.el6_8.x86_64.rpm | 8.6 MB 00:01 &#8230;<br \/>\n(3\/4): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm | 134 kB 00:00 &#8230;<br \/>\n(4\/4): perl-DBI-1.609-4.el6.x86_64.rpm | 705 kB 00:00 &#8230;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nTotal 3.8 MB\/s | 10 MB 00:02<br \/>\nRunning rpm_check_debug<br \/>\nRunning Transaction Test<br \/>\nTransaction Test Succeeded<br \/>\nRunning Transaction<br \/>\nInstalling : perl-DBI-1.609-4.el6.x86_64 1\/4<br \/>\nInstalling : perl-DBD-MySQL-4.013-3.el6.x86_64 2\/4<br \/>\nInstalling : mysql-5.1.73-8.el6_8.x86_64 3\/4<br \/>\nInstalling : mysql-server-5.1.73-8.el6_8.x86_64 4\/4<br \/>\nVerifying : perl-DBD-MySQL-4.013-3.el6.x86_64 1\/4<br \/>\nVerifying : mysql-server-5.1.73-8.el6_8.x86_64 2\/4<br \/>\nVerifying : mysql-5.1.73-8.el6_8.x86_64 3\/4<br \/>\nVerifying : perl-DBI-1.609-4.el6.x86_64 4\/4<\/p><\/blockquote>\n<p>Wait for the installation to complete. Result:<\/p>\n<blockquote class=\"td_quote_box td_box_left\"><p>Installed:<br \/>\nmysql-server.x86_64 0:5.1.73-8.el6_8<\/p>\n<p>Dependency Installed:<br \/>\nmysql.x86_64 0:5.1.73-8.el6_8 perl-DBD-MySQL.x86_64 0:4.013-3.el6<br \/>\nperl-DBI.x86_64 0:1.609-4.el6<\/p>\n<p>Complete!<\/p><\/blockquote>\n<p>If you see the word &#8220;Complete!&#8221; At the bottom of the page, means that MySQL has been successfully installed on the server.<\/p>\n<p><strong>Step 3 &#8211; Run MySQL and see if it works<\/strong><\/p>\n<p>MySQL is not booted after installation, so you need to boot with the following command:<\/p>\n<blockquote class=\"td_quote_box td_box_left\"><p>sudo systemctl start mysqld<\/p><\/blockquote>\n<p>Wait a few seconds. You will not receive a response to MySQL startup, so check the following:<\/p>\n<blockquote class=\"td_quote_box td_box_left\"><p>sudo systemctl status mysqld<\/p><\/blockquote>\n<p>The result of the MySQL status will be as follows:<\/p>\n<p>If you see MySQL active and running as shown above, you have successfully installed MySQL and have started MySQL on the server.<\/p>\n<p><strong>Summary<\/strong><br \/>\nYou have completely installed MySQL on CentOS 7 server. From now on you can store databases on it to manage them or using them to build websites or web applications.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL is a free and open source software used to manage databases on a computer. MySQL can be installed on many different operating system platforms such as Windows, Linux and Mac OS X. In this article, we will guide you to install MySQL in CentOS 7 using command line on server. What you need to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[69,65],"_links":{"self":[{"href":"https:\/\/forumweb.hosting\/blog\/wp-json\/wp\/v2\/posts\/57"}],"collection":[{"href":"https:\/\/forumweb.hosting\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/forumweb.hosting\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/forumweb.hosting\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/forumweb.hosting\/blog\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":10,"href":"https:\/\/forumweb.hosting\/blog\/wp-json\/wp\/v2\/posts\/57\/revisions"}],"predecessor-version":[{"id":550,"href":"https:\/\/forumweb.hosting\/blog\/wp-json\/wp\/v2\/posts\/57\/revisions\/550"}],"wp:attachment":[{"href":"https:\/\/forumweb.hosting\/blog\/wp-json\/wp\/v2\/media?parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/forumweb.hosting\/blog\/wp-json\/wp\/v2\/categories?post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/forumweb.hosting\/blog\/wp-json\/wp\/v2\/tags?post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}