Install MySQL on RHEL5 or CentOS5

To install MySQL server on the Red Hat Enterprise Linux 5 or CentOS5 operating systems is quite simple if you happen to know the correct yum packages. After a little research, this is the quickest and easiest path to get MySQL server up and running.

Install MySQL server

yum install mysql-server

Autostart MySQL server

chkconfig --level 2345 mysqld on
service mysqld start

Create a password for the user root. Substitute yourrootsqlpassword with the desired password.

mysqladmin -u root password yourrootsqlpassword

MySQL server is setup, running, and ready for databases.