CentOS Server Set Up - Installing MySQL

Manager's picture

1. Installing MySQL

yum install mysql mysql-server

2. Create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server

chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start

3. Set passwords for the MySQL root account

mysql_secure_installation

Then create new password and remove all privileges

Set root password
Remove anonymous users
Disallow root login remotely
Remove test database and access to it
Remove test database and access to it