欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

MySQL 客戶端不輸入用戶名和密碼直接連接數(shù)據(jù)庫的2個(gè)方法

 更新時(shí)間:2009年07月07日 02:10:41   作者:  
MySQL 客戶端不輸入用戶名和密碼直接連接數(shù)據(jù)庫的2個(gè)方法,大家可以測(cè)試下。

有2個(gè)方法
一、可以修改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ù)請(qǐng)自行查看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 .

相關(guān)文章

  • MySQL分類排名和分組TOP N實(shí)例詳解

    MySQL分類排名和分組TOP N實(shí)例詳解

    大家好,本篇文章主要講的是MySQL分類排名和分組TOP N實(shí)例詳解,感興趣的同學(xué)趕快來看一看吧,對(duì)你有幫助的話記得收藏一下
    2022-01-01
  • 在WIN命令提示符下mysql 用戶新建、授權(quán)、刪除,密碼修改

    在WIN命令提示符下mysql 用戶新建、授權(quán)、刪除,密碼修改

    一般情況下,修改MySQL密碼,授權(quán),是需要有mysql里的root權(quán)限的,本操作是在WIN命令提示符下,感興趣的朋友可以參考下
    2013-11-11
  • MySQL處理JSON常見函數(shù)的使用

    MySQL處理JSON常見函數(shù)的使用

    這篇文章主要介紹了MySQL處理JSON常見函數(shù)的使用,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2021-03-03
  • MySQL數(shù)據(jù)庫多表操作通關(guān)指南(外鍵約束和多表聯(lián)合查詢)

    MySQL數(shù)據(jù)庫多表操作通關(guān)指南(外鍵約束和多表聯(lián)合查詢)

    看再多的資料不如自己親自動(dòng)手實(shí)戰(zhàn),往往實(shí)戰(zhàn)才能滲透知識(shí),下面這篇文章主要給大家介紹了關(guān)于MySQL數(shù)據(jù)庫多表操作的相關(guān)資料,包含外鍵約束和多表聯(lián)合查詢等,需要的朋友可以參考下
    2022-06-06
  • mysql(5.6及以下)解析json的方法實(shí)例詳解

    mysql(5.6及以下)解析json的方法實(shí)例詳解

    這篇文章主要介紹了mysql(5.6及以下)解析json的方法,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值 ,需要的朋友可以參考下
    2019-07-07
  • MySQL中常見的八種SQL錯(cuò)誤用法示例

    MySQL中常見的八種SQL錯(cuò)誤用法示例

    這篇文章主要給大家介紹了關(guān)于MySQL中常見的八種SQL錯(cuò)誤用法示例的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用MySQL具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-08-08
  • VMWare linux mysql 5.7.13安裝配置教程

    VMWare linux mysql 5.7.13安裝配置教程

    這篇文章主要為大家詳細(xì)介紹了VMWare linux mysql 5.7.13安裝配置教程,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-05-05
  • 淺談mysql導(dǎo)出表數(shù)據(jù)到excel關(guān)于datetime的格式問題

    淺談mysql導(dǎo)出表數(shù)據(jù)到excel關(guān)于datetime的格式問題

    這篇文章主要介紹了淺談mysql導(dǎo)出表數(shù)據(jù)到excel關(guān)于datetime的格式問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧
    2020-07-07
  • 為什么mysql字段要使用NOT NULL

    為什么mysql字段要使用NOT NULL

    數(shù)據(jù)庫字段一定要設(shè)置為 not null,不然會(huì)有很大的bug,下面就一起來介紹一下,對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2021-05-05
  • mysql 索引詳細(xì)介紹

    mysql 索引詳細(xì)介紹

    這篇文章主要介紹了mysql 索引詳細(xì)介紹的相關(guān)資料,需要的朋友可以參考下
    2016-09-09

最新評(píng)論