有2個方法
一、可以修改my.ini 配置參數(shù)(linux下面是 my.cnf);
[quote][client]
port=3306
default-character-set=utf8
host=localhost
user=root
password=1[/quote]
具體的其他參數(shù)都可以在這里修改
二、可以修改環(huán)境變量
MYSQL_HOST 代表主機(jī)名
USER 為用戶名
MYSQL_PWD 為密碼
更多的參數(shù)請自行查看mysql的幫助文檔,下面是英文的表格
Variable |
Description |
|
The name of your C++ compiler (for running configure ). |
|
The name of your C compiler (for running configure ). |
|
Flags for your C compiler (for running configure ). |
|
Flags for your C++ compiler (for running configure ). |
|
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 |
|
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 |
|
The path to the directory in which the server-specific |
|
The default host name used by the mysql command-line client. |
|
The command prompt to use in the mysql command-line client. |
|
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”. |
|
The default TCP/IP port number. |
|
The default Unix socket file name; used for connections to |
|
Used by the shell to find MySQL programs. |
|
The directory where temporary files are created. |
|
This should be set to your local time zone. See Section B.1.4.6, “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 and NetWare used when connecting to mysqld . |