Thursday, September 3, 2015

Installing MySQL on CentOS

Applicable to Centos Versions:

  • Centos 5.x
  • Centos 6.x

Requirements

  1. Login to a terminal as root using one of these options: (su –login | su -l | or: su –)
  2. Yum and rpm must also be installed and functional (something is seriously wrong if they aren’t)

Doing the Work

1. Login as root user

su - root

2. Install mysql mysql-server:

yum install mysql-server

3. Check the staus of mysql service

service mysqld status

4. Start MySQL service

service mysqld start

If it does not show any error. You are done with the installation.

Login to mysql


Type the below command on terminal
#> mysql