There are 2 methods
1. You can modify the configuration parameters of my. ini (my. cnf in linux );
[Quote] [client]
Port = 3306
Default-character-set = utf8
Host = localhost
User = root
Password = 1 [/quote]
You can modify other parameters here.
2. You can modify environment variables.
MYSQL_HOST represents the Host Name
USER is the USER name
MYSQL_PWD is the password
For more parameters, see the mysql help documentation. The following is a table in English.
Variable |
Description |
CXX |
The name of your C ++ compiler (for runningConfigure). |
CC |
The name of your C compiler (for runningConfigure). |
CFLAGS |
Flags for your C compiler (for runningConfigure). |
CXXFLAGS |
Flags for your C ++ compiler (for runningConfigure). |
DBI_USER |
The default user name for Perl DBI. |
DBI_TRACE |
Trace options for Perl DBI. |
HOME |
The default path forMysqlHistory file is$HOME/.mysql_history . |
LD_RUN_PATH |
Used to specify the locationlibmysqlclient.so . |
MYSQL_DEBUG |
Debug trace options when debugging. |
MYSQL_GROUP_SUFFIX |
Option group suffix value (like specifying--defaults-group-suffix ). |
MYSQL_HISTFILE |
The path toMysqlHistory file. If this variable is set, its value overrides the default$HOME/.mysql_history . |
MYSQL_HOME |
The path to the directory in which the server-specificmy.cnf File resides (as of MySQL 5.0.3 ). |
MYSQL_HOST |
The default host name used byMysqlCommand-line client. |
MYSQL_PS1 |
The command prompt to use inMysqlCommand-line client. |
MYSQL_PWD |
The default password when connectingMysqld. Note that using this is insecure. See Section 5.5.6.2, "End-User Guidelines for Password Security ". |
MYSQL_TCP_PORT |
The default TCP/IP port number. |
MYSQL_UNIX_PORT |
The default Unix socket file name; used for connectionslocalhost . |
PATH |
Used by the shell to find MySQL programs. |
TMPDIR |
The directory where temporary files are created. |
TZ |
This shoshould be set to your local time zone. See Section B .1.4.6, "Time Zone Problems ". |
UMASK |
The user-file creation mode when creating files. See note following table. |
UMASK_DIR |
The user-directory creation mode when creating directories. See note following table. |
USER |
The default user name on Windows and NetWare used when connectingMysqld. |