有2個方法
一、可以修改my.ini 配置參數(Linux下面是 my.cnf);
[quote][clIEnt]
port=3306
default-character-set=utf8
host=localhost
user=root
passWord=1[/quote]
具體的其他參數都可以在這裡修改
二、可以修改環境變量
MySQL_HOST 代表主機名
USER 為用戶名
MySQL_PWD 為密碼
更多的參數請自行查看MySQL的幫助文檔,下面是英文的表格
Variable Description
CXX The name of your C++ compiler (for running configure ).
CC The name of your C compiler (for running configure ).
CFLAGS Flags for your C compiler (for running configure ).
CXXFLAGS Flags for your C++ compiler (for running configure ).
DBI_USER The default user name for Perl DBI.
DBI_TRACE Trace options for Perl DBI.
HOME The default path for the mysql history file is $HOME/.MySQL_history .
LD_RUN_PATH Used to specify the location of libMySQLclIEnt.so .
MySQL_DEBUG Debug trace options when debugging.
MySQL_GROUP_SUFFIX Option group suffix value (like specifying --defaults-group-suffix ).
MYSQL_HISTFILE The path to the mysql history file. If this variable is set, its value overrides the default for $HOME/.MySQL_history .
MYSQL_HOME The path to the directory in which the server-specific my.cnf file resides (as of MySQL 5.0.3).
MYSQL_HOST The default host name used by the MySQL command-line clIEnt.
MYSQL_PS1 The command prompt to use in the MySQL command-line clIEnt.
MYSQL_PWD The default passWord when connecting to MySQLd . 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 connections to localhost .
PATH Used by the shell to find MySQL programs.
TMPDIR The directory where temporary files are created.
TZ This should 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 connecting to MySQLd .