{"id":1600,"date":"2012-01-08T10:12:59","date_gmt":"2012-01-08T02:12:59","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=1600"},"modified":"2023-06-22T22:52:28","modified_gmt":"2023-06-22T22:52:28","slug":"how-to-install-mysql-database-server-on-centos-6-2","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-mysql-database-server-on-centos-6-2\/","title":{"rendered":"How to Install MySQL Database Server on CentOS 6.2"},"content":{"rendered":"<p>In this guide, we will walk you through the process of installing the MySQL server on CentOS 6.2 using the yum command. This tutorial assumes that you have a minimal installation type of CentOS 6.2 and have set up your local yum repository. However, if your server has a direct internet connection, you can use the internet CentOS yum repository instead.<\/p>\n<p>Before we dive into the installation process, it&#8217;s important to understand what MySQL is and why it&#8217;s a crucial component for many web servers. MySQL is an open-source relational database management system that is widely used in web applications to store, organize, and retrieve data. It&#8217;s a key part of the LAMP (Linux, Apache, MySQL, PHP\/Python\/Perl) stack, a popular open-source web development platform.<\/p>\n<p>For more information about different types of web servers, you can visit our guide on the <a href=\"https:\/\/webhostinggeeks.com\/best\/web-server\/\">best web servers<\/a>. If you&#8217;re interested in learning about Apache, Nginx, or LiteSpeed servers, you can check out our detailed articles on <a href=\"https:\/\/webhostinggeeks.com\/blog\/apache-http-server-explained\/\">Apache<\/a>, <a href=\"https:\/\/webhostinggeeks.com\/blog\/nginx-server-explained\/\">Nginx<\/a>, and <a href=\"https:\/\/webhostinggeeks.com\/blog\/litespeed-web-server-explained\/\">LiteSpeed<\/a> respectively.<\/p>\n<p>Now, let&#8217;s get started with the installation process.<\/p>\n<h2>Step 1: Setting Up Local Yum Repository<\/h2>\n<p>Before you can install MySQL, you need to set up your local yum repository. If you&#8217;re not sure how to do this, you can follow our guide on <a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-setup-local-yum-repository-from-cd-romdvd-rom-image-on-centos-6-2\/\">How to Setup Local Yum Repository from CD-ROM\/DVD-ROM image on CentOS 6.2<\/a>.<\/p>\n<p>Once you have your local yum repository set up, you can proceed with the installation of MySQL.<\/p>\n<h2>Step 2: Installing MySQL and MySQL Server<\/h2>\n<p>To install MySQL and MySQL server, you will use the yum command. Open your terminal and type the following command:<\/p>\n<pre>\r\n[root@centos6 ~]# yum install mysql mysql-server\r\n<\/pre>\n<p>This command will initiate the installation process. The system will resolve dependencies and check the transaction before starting the installation.<\/p>\n<pre>\r\n[root@centos6 ~]# yum install mysql mysql-server\r\nLoaded plugins: fastestmirror\r\nLoading mirror speeds from cached hostfile\r\nSetting up Install Process\r\nResolving Dependencies\r\n--> Running transaction check\r\n---> Package mysql.i686 0:5.1.52-1.el6_0.1 will be installed\r\n---> Package mysql-server.i686 0:5.1.52-1.el6_0.1 will be installed\r\n--> Processing Dependency: perl-DBI for package: mysql-server-5.1.52-1.el6_0.1.i686\r\n--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.52-1.el6_0.1.i686\r\n--> Processing Dependency: perl(DBI) for package: mysql-server-5.1.52-1.el6_0.1.i686\r\n--> Running transaction check\r\n---> Package perl-DBD-MySQL.i686 0:4.013-3.el6 will be installed\r\n---> Package perl-DBI.i686 0:1.609-4.el6 will be installed\r\n--> Finished Dependency Resolution\r\n\r\nDependencies Resolved\r\n\r\n=================================================================================================\r\n Package                Arch         Version                  Repository                    Size\r\n=================================================================================================\r\nInstalling:\r\n mysql                  i686         5.1.52-1.el6_0.1         CentOS6.2-Repository         898 k\r\n mysql-server           i686         5.1.52-1.el6_0.1         CentOS6.2-Repository         8.3 M\r\nInstalling for dependencies:\r\n perl-DBD-MySQL         i686         4.013-3.el6              CentOS6.2-Repository         134 k\r\n perl-DBI               i686         1.609-4.el6              CentOS6.2-Repository         705 k\r\n\r\nTransaction Summary\r\n=================================================================================================\r\nInstall       4 Package(s)\r\n\r\nTotal download size: 10 M\r\nInstalled size: 27 M\r\nIs this ok [y\/N]: y\r\nDownloading Packages:\r\n-------------------------------------------------------------------------------------------------\r\nTotal                                                             13 MB\/s |  10 MB     00:00\r\nRunning rpm_check_debug\r\nRunning Transaction Test\r\nTransaction Test Succeeded\r\nRunning Transaction\r\n  Installing : perl-DBI-1.609-4.el6.i686                                                     1\/4\r\n  Installing : perl-DBD-MySQL-4.013-3.el6.i686                                               2\/4\r\n  Installing : mysql-5.1.52-1.el6_0.1.i686                                                   3\/4\r\n  Installing : mysql-server-5.1.52-1.el6_0.1.i686                                            4\/4\r\n\r\nInstalled:\r\n  mysql.i686 0:5.1.52-1.el6_0.1               mysql-server.i686 0:5.1.52-1.el6_0.1\r\n\r\nDependency Installed:\r\n  perl-DBD-MySQL.i686 0:4.013-3.el6                  perl-DBI.i686 0:1.609-4.el6\r\n\r\nComplete!\r\n<\/pre>\n<p>During the installation process, you will see a list of packages that will be installed, including MySQL and MySQL server, along with their dependencies. The system will also display the total download size and the installed size.<\/p>\n<p>When prompted with &#8220;Is this ok [y\/N]:&#8221;, type &#8216;y&#8217; and press Enter to proceed with the installation.<\/p>\n<p>The system will then download the packages and run a transaction test before finally installing the packages.<\/p>\n<p>Once the installation is complete, you will see a message that confirms the installed packages.<\/p>\n<p>Congratulations! You have successfully installed MySQL and MySQL server on your CentOS 6.2 system.<\/p>\n<h2>Commands Mentioned<\/h2>\n<ul>\n<li><span class=\"fw-bold\">yum install mysql mysql-server<\/span> \u2013 This command installs MySQL and MySQL server on your system.<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>In this tutorial, we have walked you through the process of installing MySQL and MySQL server on CentOS 6.2 using the yum command. This process involves setting up your local yum repository, initiating the installation process, resolving dependencies, and confirming the installation.<\/p>\n<p>By following these steps, you can successfully install MySQL and MySQL server on your system, enabling you to store, organize, and retrieve data for your web applications.<\/p>\n<p>Remember, choosing the right hosting for your server is crucial for the performance of your web applications. If you&#8217;re interested in learning more about different types of hosting, you can check out our articles on <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-dedicated-server-hosting\/\">dedicated<\/a>, <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-vps-hosting\/\">VPS<\/a>, <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-cloud-hosting\/\">cloud<\/a>, and <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-shared-hosting\/\">shared<\/a> hosting.<\/p>\n<p>We hope this guide has been helpful in your journey to becoming a proficient webmaster or website administrator. Remember, the key to mastering these skills is practice and continuous learning. Don&#8217;t hesitate to revisit this guide or any of our other resources as you continue to hone your skills.<\/p>\n<p>Happy hosting!<\/p>\n<h2>FAQ<\/h2>\n<ol itemscope itemtype=\"https:\/\/schema.org\/FAQPage\">\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What is MySQL?<\/p>\n<pitemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">MySQL is an open-source relational database management system. It is widely used in web applications to store, organize, and retrieve data. It&#8217;s a key part of the LAMP (Linux, Apache, MySQL, PHP\/Python\/Perl) stack, a popular open-source web development platform.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">Why do I need to set up a local yum repository?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">A local yum repository is required to install packages on CentOS. It contains the metadata for the available packages and enables you to install, upgrade, or remove software on your system using the yum command.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What does the &#8216;yum install mysql mysql-server&#8217; command do?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">The &#8216;yum install mysql mysql-server&#8217; command installs MySQL and MySQL server on your CentOS system. It resolves dependencies and checks the transaction before starting the installation.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What are the dependencies for MySQL server?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">The dependencies for MySQL server include perl-DBI and perl-DBD-MySQL. These are Perl modules that provide a database independent interface for Perl and a MySQL driver for the Perl5 Database Interface, respectively.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">How do I confirm that MySQL and MySQL server are installed?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">Once the installation is complete, the terminal will display a message confirming the installed packages. This message indicates that MySQL and MySQL server have been successfully installed on your system.<\/span>\n            <\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we will walk you through the process of installing the MySQL server on CentOS 6.2 using the yum command. This tutorial assumes that you have a minimal&#8230;<\/p>\n","protected":false},"author":6,"featured_media":343,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1008],"tags":[1253,1536,1585],"class_list":["post-1600","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-centos-6-2","tag-linux","tag-mysql"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/1600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=1600"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/1600\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/343"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=1600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=1600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=1600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}