How to install MySQL on CentOS

- by

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 😉



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

6 thoughts on “How to install MySQL on CentOS”

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.