How to Install MySQL Database Server on CentOS 5.7

In this post, i will show you on how to install MySQL server on CentOS 5.7. MySQL is a popular choice of database server that can stores and retrieves data for the blog, websites and applications. This post assumed that you have direct internet connection.

Simply run this command to install MySQL server:

    root@CentOS57 ~]# yum install mysql mysql-server
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: centos.vr-zone.com
     * extras: centos.vr-zone.com
     * updates: mirror.yourconnect.com
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package mysql.i386 0:5.0.77-4.el5_6.6 set to be updated
    --> Processing Dependency: perl(DBI) for package: mysql
    ---> Package mysql-server.i386 0:5.0.77-4.el5_6.6 set to be updated
    --> Processing Dependency: perl-DBD-MySQL for package: mysql-server
    --> Running transaction check
    ---> Package perl-DBD-MySQL.i386 0:3.0007-2.el5 set to be updated
    ---> Package perl-DBI.i386 0:1.52-2.el5 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ====================================================================================================
     Package                    Arch             Version                         Repository        Size
    ====================================================================================================
    Installing:
     mysql                      i386             5.0.77-4.el5_6.6                base             4.8 M
     mysql-server               i386             5.0.77-4.el5_6.6                base             9.8 M
    Installing for dependencies:
     perl-DBD-MySQL             i386             3.0007-2.el5                    base             148 k
     perl-DBI                   i386             1.52-2.el5                      base             600 k
    
    Transaction Summary
    ====================================================================================================
    Install       4 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 15 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/4): perl-DBD-MySQL-3.0007-2.el5.i386.rpm                                  | 148 kB     00:01
    (2/4): perl-DBI-1.52-2.el5.i386.rpm                                          | 600 kB     00:18
    (3/4): mysql-5.0.77-4.el5_6.6.i386.rpm                                       | 4.8 MB     02:19
    (4/4): mysql-server-5.0.77-4.el5_6.6.i386.rpm                                | 9.8 MB     03:54
    ----------------------------------------------------------------------------------------------------
    Total                                                                40 kB/s |  15 MB     06:34
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : perl-DBI                                                                     1/4
      Installing     : mysql                                                                        2/4
      Installing     : perl-DBD-MySQL                                                               3/4
      Installing     : mysql-server                                                                 4/4
    
    Installed:
      mysql.i386 0:5.0.77-4.el5_6.6                 mysql-server.i386 0:5.0.77-4.el5_6.6
    
    Dependency Installed:
      perl-DBD-MySQL.i386 0:3.0007-2.el5                   perl-DBI.i386 0:1.52-2.el5
    
    Complete!
    

Start MySQL server :

    [root@CentOS57 ~]# service mysqld start
    Initializing MySQL database:  Installing MySQL system tables...
    120122 18:37:28 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
    120122 18:37:28 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
    OK
    Filling help tables...
    120122 18:37:28 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
    120122 18:37:28 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
    OK
    
    To start mysqld at boot time you have to copy
    support-files/mysql.server to the right place for your system
    
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h CentOS57 password 'new-password'
    
    Alternatively you can run:
    /usr/bin/mysql_secure_installation
    
    which will also give you the option of removing the test
    databases and anonymous user created by default.  This is
    strongly recommended for production servers.
    
    See the manual for more instructions.
    
    You can start the MySQL daemon with:
    cd /usr ; /usr/bin/mysqld_safe &
    
    You can test the MySQL daemon with mysql-test-run.pl
    cd mysql-test ; perl mysql-test-run.pl
    
    Please report any problems with the /usr/bin/mysqlbug script!
    
    The latest information about MySQL is available on the web at
    http://www.mysql.com
    Support MySQL by buying support/licenses at http://shop.mysql.com
                                                               [  OK  ]
    Starting MySQL:                                            [  OK  ]
    

Make MySQL Service auto-start at boot up :

    [root@CentOS57 ~]# chkconfig mysqld on
    

How to Reset the Directory Manager Password on RHEL 7 / CentOS 7
How to Reset the Directory Manager Password on RHEL 7 / CentOS 7

It is best practice to remember passwords, but because too many passwords, sometimes we forget. We are not encouraged to write the password on any paper or share the password...

How to Find Big Files Size on Linux RHEL/CentOS
How to Find Big Files Size on Linux RHEL/CentOS

As the linux administrator, sometimes we have to identify which files are most take much space in the linux server resulting in low free space. Low disk space can also...

Why Linux users should worry about malware and what they can do about it
Why Linux users should worry about malware and what they can do about it

Don’t drop your guard just because you’re running Linux. Preventing the spread of malware and/or dealing with the consequences of infection are a fact of life when using computers. If...

How to Reset Forgotten Root Password on Linux RHEL 7 / CentOS 7
How to Reset Forgotten Root Password on Linux RHEL 7 / CentOS 7

This short howto will explain the steps to reset a lost root password or to reset a forgotten root password on Linux RHEL 7 or CentOS 7. Basically, we will...

How to Update CentOS or Upgrade CentOS to the Latest Version
How to Update CentOS or Upgrade CentOS to the Latest Version

Recently, the latest version of CentOS 7.3 was released. All users of CentOS 7.0, 7.1 and 7.2 can upgrade their system to the most recent. This quick guide will explain...

How to Change your WordPress Username, Nickname and Display Name in MySQL
How to Change your WordPress Username, Nickname and Display Name in MySQL

After you create an account log in WordPress, you may want to change your WordPress username, as appropriate or due to security reason. However, you can not do this from...

How to Enable SSH Root Login on Ubuntu 16.04
How to Enable SSH Root Login on Ubuntu 16.04

As what we wrote in the previous article on how to allow SSH root on Ubuntu 14.04, after installing a fresh new copy of Ubuntu 16.04 LTS, we find that...

How to Change UUID of Linux Partition on CentOS 7
How to Change UUID of Linux Partition on CentOS 7

UUID (Universally Unique IDentifier) should be unique and it is used to identify storage devices on a linux system. If you cloned a virtual machine from vCenter, the metadata containing...

Leave a Reply

Your email address will not be published. Required fields are marked *