I am currently using Red Hat linux. I just want to find out whether MySQL is installed in that system. If yes where is it located? can anyone help please...
6 Answers
Type mysql --version
to see if it is installed.
To find location use find -name mysql
.

- 1,208
- 11
- 21

- 2,753
- 1
- 19
- 26
-
7`find -name mysql` will only work if your working directory is `/` or `/usr` (or whatever component of the `mysql` location). `which mysql` is better if you want to locate a binary as it searches in the directories of `$PATH` only. – Lekensteyn May 12 '11 at 07:02
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.

- 490
- 3
- 9
yum list installed | grep mysql
Then if it's not installed you can do (as root)
yum install mysql -y

- 572
- 6
- 18
to ckeck the status use the below command, which worked on debian....
/etc/init.d/mysql status
to start my sql server use the below command
/etc/init.d/mysql start
to stop the server use the below command
/etc/init.d/mysql stop

- 915
- 9
- 8
Usually you can find a program under a subdirectory "../bin". System programs are under /usr/bin or /bin. To check where files of mysql package are placed, on RHEL 6 type like this :
rpm -ql mysql (which is the main part of the package)
and the result is a list of "exe" files such as "mysqladmin" tool. About to know the version of the server, run the command:
mysqladmin -u "valid-user" version

- 1
rpmquery <package Name>
By this command you can check which package is installed.
For Example: rpmquery mysql

- 5,548
- 10
- 52
- 88