The MySQL client programs that communicate with the MySQL server using libraries use the following environment variables:
- MYSQL_UNIX_PORT: This variable is responsible for the default Unix socket file which will be used for connecting to a localhost
- MYSQL_TCP_PORT: This variable is responsible for providing the default port number and is used in TCP/IP connections
- MYSQL_PWD: This variable is responsible for providing the default password.
- MYSQL_DEBUG: This variable is responsible for providing debug trace options during debugging operations
- TMPDIR: This variable is responsible for providing the directory where the temporary files and tables will be created
For a detailed list and uses of environment variables in programs, ...