well, there's probably a better way... but you could always search for it...
find / -name mysql -type d
searches starting at / for something named mysql of type directory
how can i find mysql dir? if i install mysql using yum
well, there's probably a better way... but you could always search for it...
find / -name mysql -type d
searches starting at / for something named mysql of type directory
63,000 bugs in the code, 63,000 bugs,
ya get 1 whacked with a service pack,
now there's 63,005 bugs in the code!!
which one is the home directory in my case ? and what does that -type d mean ?Code:[root@linux2 ~]# find / -name mysql -type d /usr/share/mysql /usr/include/mysql /usr/lib/mysql /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/DBD/mysql /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql /var/lib/mysql /var/lib/mysql/mysql
"-type d" means search for anything which is a directory matching the "-name mysql"
By the way, searching for the "file" mysql, is a bit deviant, since mysql is the executable which invokes communication with the database mysql has created on your system, which in fact is a structure of its own created as a single file/library within your filesystem.
Don't worry Ma'am. We're university students, - We know what We're doing.
'Ruiat coelum, fiat voluntas tua.'Datalogi - en livsstil; Intet liv, ingen stil.
If you're looking for the homedir for the mysql user, you can try:
cat /etc/passwd | grep mysql | awk -F: '{print $6}';
cat will output /etc/passwd to stdout, grep takes only lines with mysql in them and awk splits the string (based on ':' ) and prints the 6th item.
63,000 bugs in the code, 63,000 bugs,
ya get 1 whacked with a service pack,
now there's 63,005 bugs in the code!!
Bookmarks