Appendix F. Environment Variables

MySQL 5.0

Appendix F. Environment Variables

This appendix lists all the environment variables that are used directly or indirectly by MySQL. Most of these can also be found in other places in this manual.

Note that any options on the command line take precedence over values specified in option files and environment variables, and values in option files take precedence over values in environment variables.

In many cases, it is preferable to use an option file instead of environment variables to modify the behavior of MySQL. See Section 4.3.2, “Using Option Files”.

Variable Description
The name of your C++ compiler (for running configure).
The name of your C compiler (for running configure).
Flags for your C compiler (for running configure).
Flags for your C++ compiler (for running configure).
The default username for Perl DBI.
Trace options for Perl DBI.
The default path for the mysql history file is .
Used to specify the location of .
Debug trace options when debugging.
Option group suffix value (like specifying ).
The path to the mysql history file. If this variable is set, its value overrides the default for .
The path to the directory in which the server-specific file resides (as of MySQL 5.0.3).
The default hostname used by the mysql command-line client.
The command prompt to use in the mysql command-line client.
The default password when connecting to mysqld. Note that using this is insecure. See Section 5.9.6, “Keeping Your Password Secure”.
The default TCP/IP port number.
The default Unix socket filename; used for connections to .
Used by the shell to find MySQL programs.
The directory where temporary files are created.
This should be set to your local time zone. See Section A.4.6, “Time Zone Problems”.
The user-directory creation mask when creating directories. Note that this is ed with .
The user-file creation mask when creating files.
The default username on Windows and NetWare used when connecting to mysqld.