How to Install MySQL Server on CentOS

 

 

Database  is necessary in every website. Most of website use MySQL database only. It provides a solid
platform to use ,store ,manage ,organize and querying database.

You can download the latest version of Putty SSH client by clicking below link

Click here  for 32-bit.

Click here for 64-bit.

After that, Install it on your computer to make your SSH connection.

 

Before you proceed, These are basic commands kindly click Commands Link

Step 1 -Install MySQL using yum on CentOS. Issue following command.

 

#yum install mysql-server

Type the basic command above and hit Enter.

It will ask for confirmation, simply type Y then hit Enter again

Once done it will dispaly the complete! message:

Step 2 – You’ve installed MySQL on your server. It’s time to start MySQL main  service . Issue this command

 

#service mysqld start

As usual, it should display the OK message indicating everything’s fine:

Step 3- Setup MySQL root password.

Every server has “root” user but MySQL also has it own. but  server’s root password is not similar
as root password for MySQL. Go ahead set a root MySQL password by issuing this command:

#/usr/bin/mysql_secure_installation

It will then ask you to enter current password. As you never set it up previously, so simple hit Enter
(because currently there is no password)

It will ask to set root password [y/n]. Type Y and hit Enter then type in your new password twice

 

 

Yet, you’ll also be asked for several question. Simply answer with Y to move on.

 

Remove anonymous users? [Y/n] y                                            
 ... Success!
 
Disallow root login remotely? [Y/n] y
... Success!
 
Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!
 
Reload privilege tables now? [Y/n] y
 ... Success!

At the end, it will say: Thanks for using MySQL

That’s it, Now your server is really ready to host a website.

Leave a Reply

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