SQL

Install MySQL on Linux

Installing MySQL on Linux is pretty easy. You can use yum (or your favorite package manager for most installs. Here, we’ll pull a list of packages from yum using repolist:

yum repolist enabled | grep "mysql.*-community.*"

You’ll then get a list of community edition MySQL packages that are available. Then let’s say you’re installing on RHEL 6, we’ll pull a string from the repolist of an appropriate package and then do a localinstall of it:

sudo yum localinstall mysql57-community-release-el6-157.noarch.rpm

We could also grab mysql and all the other stuffs we want to have with it:

yum install mysql mysql-server mysql-libs mysql-server

And then start it up:

service mysql start