How to install MySQL on CentOS

Assuming you’d like to run WordPress on your very own vanilla CentOS system, open a terminal window and do the following:

yum install php-mysql mysql mysql-server
/sbin/chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start

You have to be logged on as root to do this.

The next thing you probably want to do is create a database so you can run WordPress on it. As you may know, we need phpMyAdmin to do this, so we’ll install that next:

yum install phpmyadmin

In case it doesn’t work, phpmyadmin is available from EPEL or RPM Forge – check out this article if you haven’t got it on your system.

Now we need to restart apache so it’ll know about his new companion:

service httpd restart

Excellent! We’re getting there. Now let’s create that database….

Well, I’m stuck here! I’ll let you know when I’ve figured it out. Until then, happy googling 😉

Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or draw on tablet devices.

He blogs about his coding journey at and