Home > Operation and Maintenance > CentOS > How to check where the mysql installation directory is in centos

How to check where the mysql installation directory is in centos

Release: 2020-03-28 16:19:05
Original
12147 people have browsed it

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
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template