程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> MySQL綜合教程 >> MySQL 客戶端不輸出用戶名和暗碼直接銜接數據庫的2個辦法

MySQL 客戶端不輸出用戶名和暗碼直接銜接數據庫的2個辦法

編輯:MySQL綜合教程

MySQL 客戶端不輸出用戶名和暗碼直接銜接數據庫的2個辦法。本站提示廣大學習愛好者:(MySQL 客戶端不輸出用戶名和暗碼直接銜接數據庫的2個辦法)文章只能為提供參考,不一定能成為您想要的結果。以下是MySQL 客戶端不輸出用戶名和暗碼直接銜接數據庫的2個辦法正文


有2個辦法
1、可以修正my.ini 設置裝備擺設參數(linux上面是 my.cnf);
[quote][client]
port=3306
default-character-set=utf8
host=localhost
user=root
password=1[/quote]
詳細的其他參數都可以在這裡修正
2、可以修正情況變量
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 .
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved