Các biến sau đây được cụ thể cho các chương trình MySQL. Họ có thể được xác định trong vỏ hiện tại hoặc là một phần của kịch bản. Để thiết lập một biến cho các daemon MySQL (mysqld), định nghĩa biến trong kịch bản safe_mysqld được sử dụng để khởi chạy trình nền hoặc xác định các biến trong file cấu hình MySQL. | DRAFT 8 24 01 19 MySQL System Variables A variety of settings can be used to customize the operation of MySQL. Settings fall into two main categories Operating System Environment variables MySQL variables which can be set via the command line or in a configuration file. Variables defined in multiple places follow obey the following order of precedence 1. Items defined on the command line take precedence over configuration files and environment variables. 2. Items defined in configuration files take precedence over environment variables. For more information on the use of configuration files to set system variables and command line options refer to Chapter 5 Database Administration. Environment Variables The following variables are specific to MySQL programs. They may be defined in the current shell or as part of a shell script. To set a variable for the MySQL daemon mysqld define the variable in the safe_mysqld script that is used to start the daemon or define the variables in the MySQL configuration file. MYSQL_DEBUG The debug trace level for the program. This option can be used with any MySQL program. There are a wide variety of debug trace options which are documented in the MySQL documented in the MySQL documentation at http www. mysql. com documentation in the section on Debugging a MySQL server and Debugging a MySQL client. Copyright 2001 O Reilly Associates Inc. 1 DRAFT 8 24 01 MYSQL_HOST The hostname used to connect to a remote MySQL database server. This option can be used with any of the MySQL client programs mysql mysqlshow mysqladmin etc. . This is equivalent to the --host command line option. MYSQL_HISTFILE The location of the MySQL history file used by the mysql client. By default this is HOME .mysql_history . There is no equivalent command line options. MYSQL_PWD The password used to connect to the MySQL database server. This option can be used with any of the MySQL client programs and is equivalent to the --password commnd line option. Be careful .