Home>Article>Operation and Maintenance> How to check where the mysql installation directory is in centos
How to view the mysql installation directory in centos:
Recommended tutorial:centos usage tutorial
1. Use ps - ef|grep mysql command view:
Result:
root 17659 1 0 2011 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid mysql 17719 17659 0 2011 ? 03:14:57 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock
usr/bin/mysql refers to: the running path of mysql
var/lib/mysql refers to: mysql database The file storage path
usr/lib/mysql refers to: the installation path of mysql
2. Use the whereis mysql command to view
If you have installed mysql, you will Display the address where the file is installed, for example my display (the installation address may be different):
[root@larry var]# whereis mysql mysql: /usr/bin/mysql /usr/lib/mysql /usr/include/mysql /usr/local/mysql
Related video tutorial recommendations:linux video tutorial
The above is the detailed content of How to check where the mysql installation directory is in centos. For more information, please follow other related articles on the PHP Chinese website!