Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Seems that I cannot locate mysql DIR only bunch of binary files under /usr/bin

I used yum to install

mysql
mysql-server
mysql-devel

and tried to install mysql and I used /init.d/mysqld to have started it.

But when I want to compile PHP , the option --with-mysql need the base DIR of mysql ...where should I use? /usr/bin?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

You should run this command

mysqladmin -uroot variables | grep datadir | sed 's/|/ /g' | awk '{print $2}'

to find the default data directory.

If you cannot login to mysql just yet, you can still run this

which mysqld
which mysqld_safe

to locate the binaries.

Give it a Try !!!

share|improve this answer
add comment

Have you tried: /usr/local/mysql/bin?

share|improve this answer
    
no mysql directory under /usr/local –  Jusfeel May 23 '11 at 3:45
    
Did you look in /usr/bin for the binaries? –  Justin Pearce May 23 '11 at 18:51
    
Yes, that's the only place that I thought MySQL yum install had been installed files to.. –  Jusfeel May 24 '11 at 6:41
    
Depending upon the distro and/or package it usually puts things in either /usr/bin or /usr/local/bin. Glad you got it sorted! –  Justin Pearce May 24 '11 at 18:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.