This section lists environment variables that are used directly or indirectly by MySQL. Most of these can also be found in other places in this manual.
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.2.6, “Using Option Files”.
|The name of your C++ compiler (for running CMake).|
|The name of your C compiler (for running CMake).|
|The default user name for Perl DBI.|
|Trace options for Perl DBI.|
|The default path for the mysql history file is
|Used to specify the location of |
|Directory in which to look for client plugins.|
|Client plugins to preload.|
|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
|Patterns specifying statements not to log to
|The path to the directory in which the server-specific
|The default host name used by the mysql command-line client.|
|Maximum key length for
|Maximum DSA key length for
|Maximum RSA key length for
|The command prompt to use in the mysql command-line client.|
|The default password when connecting to mysqld. Using this is insecure. See Section 22.214.171.124, “End-User Guidelines for Password Security”.|
|The default TCP/IP port number.|
|The name of the |
|The default Unix socket file name; used for connections to
|Used by the shell to find MySQL programs.|
|The directory in which temporary files are created.|
|This should be set to your local time zone. See Section B.5.3.7, “Time Zone Problems”.|
|The user-file creation mode when creating files. See note following table.|
|The user-directory creation mode when creating directories. See note following table.|
|The default user name on Windows when connecting to mysqld.|
MYSQL_TEST_LOGIN_FILE is the path name of the
login path file (the file created by
mysql_config_editor). If not set, the default
on Windows and
non-Windows systems. See Section 4.6.6, “mysql_config_editor — MySQL Configuration Utility”.
UMASK_DIR values are
0700, respectively. MySQL assumes that the value
UMASK_DIR is in
octal if it starts with a zero. For example, setting
UMASK=0600 is equivalent to
UMASK=384 because 0600 octal is 384 decimal.
variables, despite their names, are used as modes, not masks:
UMASKis set, mysqld uses
($UMASK | 0600)as the mode for file creation, so that newly created files have a mode in the range from 0600 to 0666 (all values octal).
UMASK_DIRis set, mysqld uses
($UMASK_DIR | 0700)as the base mode for directory creation, which then is AND-ed with
~(~$UMASK & 0666), so that newly created directories have a mode in the range from 0700 to 0777 (all values octal). The AND operation may remove read and write permissions from the directory mode, but not execute permissions.