6

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?

2 Answers 2

4

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 !!!

1

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

4
  • no mysql directory under /usr/local
    – Hao
    May 23, 2011 at 3:45
  • Did you look in /usr/bin for the binaries? May 23, 2011 at 18:51
  • Yes, that's the only place that I thought MySQL yum install had been installed files to..
    – Hao
    May 24, 2011 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! May 24, 2011 at 18:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .