How to find whether MySQL is installed in Red Hat? How to find whether MySQL is installed in Red Hat? linux linux

How to find whether MySQL is installed in Red Hat?


Type mysql --version to see if it is installed.

To find location use find -name mysql.


If you're looking for the RPM.

rpm -qa | grep MySQL

Most of it's data is stored in /var/lib/mysql so that's another good place to look.

If it is installed

which mysql

will give you the location of the binary.

You could also do an

updatedb

and a

locate mysql

to find any mysql files.


yum list installed | grep mysql

Then if it's not installed you can do (as root)

yum install mysql -y