{"id":2999,"date":"2012-05-09T22:44:57","date_gmt":"2012-05-09T14:44:57","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=2999"},"modified":"2023-04-28T09:49:20","modified_gmt":"2023-04-28T09:49:20","slug":"how-to-install-mysql-server-on-centos-5-8","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-mysql-server-on-centos-5-8\/","title":{"rendered":"How to Install MySQL Server on CentOS 5.8"},"content":{"rendered":"<p>In this post, i will show on how to install MySQL database server on linux CentOS 5.8 server. MySQL server is a database server that can stores and retrieves data for the blog, websites and applications. It is one of the most popular most used in the internet especially for content management and blogging site. MySQL is a Relational Database Management System (RDBMS) that runs as a server providing multi-user access to a number of databases. For more information on MySQL, you can visit their website at www.mysql.com. <\/p>\n<p>First of all, to install mysql server, you can simply execute this command :<\/p>\n<pre>\n[root@centos58 ~]# yum install mysql-server -y\n<\/pre>\n<p>Examples :<\/p>\n<pre>\n[root@centos58 ~]# yum install mysql-server -y\nLoaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\n * base: mirror.oscc.org.my\n * extras: mirror.issp.co.th\n * updates: mirror.issp.co.th\nSetting up Install Process\nResolving Dependencies\n--> Running transaction check\n---> Package mysql-server.i386 0:5.0.95-1.el5_7.1 set to be updated\n--> Processing Dependency: mysql = 5.0.95-1.el5_7.1 for package: mysql-server\n--> Processing Dependency: perl-DBD-MySQL for package: mysql-server\n--> Processing Dependency: perl(DBI) for package: mysql-server\n--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: mysql-server\n--> Processing Dependency: perl-DBI for package: mysql-server\n--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15) for package: mysql-server\n--> Processing Dependency: libmysqlclient.so.15 for package: mysql-server\n--> Processing Dependency: libmysqlclient_r.so.15 for package: mysql-server\n--> Running transaction check\n---> Package mysql.i386 0:5.0.95-1.el5_7.1 set to be updated\n---> Package perl-DBD-MySQL.i386 0:3.0007-2.el5 set to be updated\n---> Package perl-DBI.i386 0:1.52-2.el5 set to be updated\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n====================================================================================================\n Package                    Arch             Version                      Repository           Size\n====================================================================================================\nInstalling:\n mysql-server               i386             5.0.95-1.el5_7.1             updates             9.8 M\nInstalling for dependencies:\n mysql                      i386             5.0.95-1.el5_7.1             updates             4.9 M\n perl-DBD-MySQL             i386             3.0007-2.el5                 base                148 k\n perl-DBI                   i386             1.52-2.el5                   base                600 k\n\nTransaction Summary\n====================================================================================================\nInstall       4 Package(s)\nUpgrade       0 Package(s)\n\nTotal download size: 15 M\nDownloading Packages:\nhttp:\/\/mirror.oscc.org.my\/centos\/5.8\/os\/i386\/CentOS\/perl-DBD-MySQL-3.0007-2.el5.i386.rpm: [Errno 12] Timeout: <urlopen error timed out>\nTrying other mirror.\n(1\/4): perl-DBD-MySQL-3.0007-2.el5.i386.rpm                                  | 148 kB     00:01\n(2\/4): perl-DBI-1.52-2.el5.i386.rpm                                          | 600 kB     00:12\n(3\/4): mysql-5.0.95-1.el5_7.1.i386.rpm                                       | 4.9 MB     02:36\n(4\/4): mysql-server-5.0.95-1.el5_7.1.i386.rpm                                | 9.8 MB     03:48\n----------------------------------------------------------------------------------------------------\nTotal                                                                37 kB\/s |  15 MB     07:09\nRunning rpm_check_debug\nRunning Transaction Test\nFinished Transaction Test\nTransaction Test Succeeded\nRunning Transaction\n  Installing     : perl-DBI                                                                     1\/4\n  Installing     : mysql                                                                        2\/4\n  Installing     : perl-DBD-MySQL                                                               3\/4\n  Installing     : mysql-server                                                                 4\/4\n\nInstalled:\n  mysql-server.i386 0:5.0.95-1.el5_7.1\n\nDependency Installed:\n  mysql.i386 0:5.0.95-1.el5_7.1   perl-DBD-MySQL.i386 0:3.0007-2.el5   perl-DBI.i386 0:1.52-2.el5\n\nComplete!\n<\/pre>\n<p>Note : MySQL server service daemon is mysqld.<\/p>\n<p>To check Mysqld status :<\/p>\n<pre>\n[root@centos58 ~]# service mysqld status\nmysqld is stopped\n<\/pre>\n<p>Start MySQL service :<\/p>\n<pre>\n[root@centos58 ~]# service mysqld start\n<\/pre>\n<p>Start MySQL service at first time :<\/p>\n<pre>\n[root@centos58 ~]# service mysqld start\nInitializing MySQL database:  WARNING: The host 'centos58.ehowtuff.local' could not be looked up with resolveip.\nThis probably means that your libc libraries are not 100 % compatible\nwith this binary MySQL version. The MySQL daemon, mysqld, should work\nnormally with the exception that host name resolving will not work.\nThis means that you should use IP addresses instead of hostnames\nwhen specifying MySQL privileges !\nInstalling MySQL system tables...\nOK\nFilling help tables...\nOK\n\nTo start mysqld at boot time you have to copy\nsupport-files\/mysql.server to the right place for your system\n\nPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !\nTo do so, start the server, then issue the following commands:\n\/usr\/bin\/mysqladmin -u root password 'new-password'\n\/usr\/bin\/mysqladmin -u root -h centos58.ehowtuff.local password 'new-password'\n\nAlternatively you can run:\n\/usr\/bin\/mysql_secure_installation\n\nwhich will also give you the option of removing the test\ndatabases and anonymous user created by default.  This is\nstrongly recommended for production servers.\n\nSee the manual for more instructions.\n\nYou can start the MySQL daemon with:\ncd \/usr ; \/usr\/bin\/mysqld_safe &\n\nYou can test the MySQL daemon with mysql-test-run.pl\ncd mysql-test ; perl mysql-test-run.pl\n\nPlease report any problems with the \/usr\/bin\/mysqlbug script!\n\nThe latest information about MySQL is available on the web at\nhttp:\/\/www.mysql.com\nSupport MySQL by buying support\/licenses at http:\/\/shop.mysql.com\n                                                           [  OK  ]\nStarting MySQL:                                            [  OK  ]\n<\/pre>\n<p>Stop MySQL service :<\/p>\n<pre>\n[root@centos58 ~]# service mysqld stop\n<\/pre>\n<p>Make mysqld daemon start at boot :<\/p>\n<pre>\n[root@centos58 ~]# chkconfig mysqld on\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In this post, i will show on how to install MySQL database server on linux CentOS 5.8 server. MySQL server is a database server that can stores and retrieves data&#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":[2055,1008],"tags":[1244,1249,1536,1546,1585],"class_list":["post-2999","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-mysql","tag-centos","tag-centos-5-8","tag-linux","tag-linux-utilities","tag-mysql"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2999","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=2999"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2999\/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=2999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=2999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=2999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}