Databases Reference
In-Depth Information
Windows
C:\mysql-5.0.22-win32\bin
for a “no-install” (zip) installation;
C:\Program Files
\MySQL\MySQL Server 5.0\bin
for a standard installation; and
C:\Program Files
\xampp\mysql\bin
for an XAMPP installation.
Mac OS X
/usr/local/mysql/bin
for a system-wide installation from a tarball or source files,
~/mysql-5.0.22/bin
for a local gzipped-tar installation,
/Applications/xampp/xampp
files/bin
for an XAMPP installation.
If you can't find the MySQL programs in one of these directories, try to remember
where you installed the server files. On a Linux or Mac OS X system, use the
find
command as the root user to locate the
mysqld_safe
program:
#
find / -name mysqld_safe
If you run this command as an ordinary user (not as
root
), you're likely to see lots of
“permission denied” messages telling you that you can't look inside certain directories.
On a Windows system, use the search tool to look for files with the word “mysql” in
their names. If your search doesn't turn anything up, it's likely that MySQL hasn't in
fact been installed. Run the installation process again, note the directory in which the
files will be installed, and ensure that all the steps complete successfully.
Once you know where the executable programs are located, you can run each execut-
able program by specifying the full path to it—for example:
$
/usr/local/mysql/
mysqladmin status
on a Linux or Mac OS X system, and:
C:\>
"C:\Program Files\MySQL\MySQL Server 5.0\bin\
mysqladmin status
on a Windows system.
If the MySQL
bin
directory is listed in your system PATH, you can simply type:
$ mysqladmin status
from your operating system command prompt. If you get a message such as:
command not found
under Linux or Mac OS X, or:
'mysqladmin' is not recognized as an internal or external command,
operable program or batch file.
under Windows, the directory containing the MySQL executable programs is not in
the system path.
The convenient thing to do is to add the MySQL
bin
directory to your system path. You
can see the list of directories in your system path by typing:
$ echo $PATH