Setup MySQL server on CentOS 6

I’m going to show you how to easily set up a MySQL server on your CentOS box.

First you need to install the required packages
yum install mysql mysql-server

Then start up your newly installed sql server
service mysqld start
Configure your server by running
mysql_secure_installation
Then follow:
Enter current password for root (enter for none): { Press Enter }
Set root password? [Y/n] { Press Y }
New password: { Type your password of choice }
Re-enter new password: { Your password again }
Remove anonymous users? [Y/n] { Press Y }
Disallow root login remotely? [Y/n] { Y is recommended, make other users for remote login}
Remove test database and access to it? [Y/n] { Y if you don’t need any test data }
Reload privilege tables now? [Y/n] { Y to clean up and applay the changes }

All done!  If you’ve completed all of the above steps, your MySQL
installation should now be secure.
Now your basic configuration is ready.

Leave a Reply

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