All MySQL clients that communicate with the server using the
mysqlclient library use the following environment variables:
|Name || Description
| The default socket; used for connections to |
| The default TCP/IP port
| The default password
| Debug-trace options when debugging
| The directory where temporary tables/files are created
MYSQL_PWD is insecure.
6.3 Connecting to the MySQL server.
The `mysql' client uses the file named in the
environment variable to save the command line history. The default value for
the history file is `$HOME/.mysql_history', where
$HOME is the
value of the
HOME environment variable.
All MySQL programs take many different options. However, every
MySQL program provides a
--help option that you can use
to get a full description of the program's different options. For example, try
You can override default options for all standard client programs with an
option file. 4.15.4 Option files.
The list below briefly describes the MySQL programs:
Utility to describe, check, optimize and repair MySQL tables.
isamchk has many functions, it is described in its own
13 Maintaining a MySQL installation.
Makes a binary release of a compiled MySQL. This could be sent
by FTP to `/pub/mysql/Incoming' on
ftp.tcx.se for the
convenience of other MySQL users.
A shell script that converts
mSQL programs to MySQL. It doesn't
handle all cases, but it gives a good start when converting.
mysql is a simple SQL shell (with GNU
It supports interactive and non-interactive use. When used interactively,
query results are presented in an ASCII-table format. When used
non-interactively (e.g., as a filter), the result is presented in
tab-separated format. (The output format can be changed using command-line
options.) You can run scripts simply like this:
shell> mysql database < script.sql > output.tab
If you have problems due to insufficient memory in the client, use the
--quick option! This forces
mysql to use
mysql_use_result() rather than
mysql_store_result() to retrieve
the result set.
A script that checks the access privileges for a host, user and database
Utility for performing administrative operations, such as creating or
dropping databases, reloading the grant tables, flushing tables to disk and
reopening log files.
mysqladmin can also be used to retrieve version,
process and status information from the server.
The MySQL bug report script. This script should always be used when
filing a bug report to the MySQL list.
The SQL daemon. This should always be running.
Dumps a MySQL database into a file as SQL statements or
as tab-separated text files. Enhanced freeware originally by Igor Romanenko.
Imports text files into their respective tables using
Displays information about databases, tables, columns and indexes.
Creates the MySQL grant tables with default privileges. This is
usually executed only once, when first installing MySQL
on a system.
A utility program that is used by
msql2mysql, but that has more
general applicability as well.
replace changes strings in place in
files or on the standard input. Uses a finite state machine to match longer
strings first. Can be used to swap strings. For example, this command
b in the given files:
shell> replace a b b a -- file1 file2 ...
A script that starts the
mysqld daemon with some safety features, such
as restarting the server when an error occurs and logging runtime information
to a log file.