I'm not a sys-admin, but sometimes I play one at work.
I've inherited a virtual server that had MySQL installed from source. I'm gathering as much information about the install as I can (original people who installed it are, of course, not a resource).
How can I find
The default/current location of the MySQL binary files (often stored in a directory named data?)
Any default or custom loaded cnf files?
Looking for solutions that are a bit more sophisticated than a find / -iname '*.cnf'
:)
When compiling from source,
/usr/local
is the default prefix. Some people like to use the standard system-wide locations, such as/usr
, instead even though it could be argued that it breaks the hierarchy standards.MySQL's default directory to store all variable files such as configuration and databases is
data
. The default system-wide configuration file ismy.cnf
.Ultimately, short of searching the filesystem, would be to look at the process list (
ps aufx
) and see where MySQL is running from, as the parameters MySQL is started with would identify its location.