1. 程式人生 > >linux下檢視mysql的安裝路徑

linux下檢視mysql的安裝路徑

 可通過以下命令檢視mysql是否安裝及其安裝路徑:
ps -ef|grep mysql
如下:
[email protected]:~/work$ ps -ef|grep mysql
root       3867   2981  0 09:23 pts/11   00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/ubuntu.pid
mysql      3959   3867  0 09:23 pts/11   00:00:57 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/ubuntu.err --pid-file=/usr/local/mysql/data/ubuntu.pid
xx         6317   6267  0 13:23 pts/17   00:00:00 grep --color=auto mysql
[email protected]
:~/work$
OK, Enjoyt it !!!