Centos – Installing MySQL on CentOS

centosMySQLyum

I have set up a nginx server running php-fpm and everything is working great. PHP is compiled with the mysql and mysqli extensions, but I'm having trouble installing MySQL. I did this command:

yum install mysql-server mysql-client

and it only installed mysql-server. it throws this error about mysql-client:

No package mysql-client available.

Now, I think MySQL is installed properly (since it mananged to install mysql-server), but when I type mysql in the SSH terminal in order to create databases etc I get this:

-bash: mysql: command not found

Which leads me to believe I need the mysql-client package installed in order to do run commands from the terminal.

Under /etc/yum.respos.d/ I have:

CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo

Best Answer

Check out yum provides "*/mysql" to find out which package provides a file in future, but the package is just called mysql in CentOS, so yum install mysql.