MySQL 客户端不输入用户名和密码直接连接数据库的2个方法
摘要:有2个方法一、可以修改my.ini配置参数(linux下面是my.cnf);[quote][client]port=3306default-...
有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 Section5.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 SectionB.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 . |
【MySQL 客户端不输入用户名和密码直接连接数据库的2个方法】相关文章:
★ MySQL中使用case when 语句实现多条件查询的方法
下一篇:
mysql 查询表中平均分最低的班级
相关阅读
网友关注
网友最新关注视频
- 第12章 圆锥曲线_12.7 抛物线的标准方程_第一课时(特等奖)(沪教版高二下册)_T274713
- 沪教版八年级下册数学练习册21.3(3)分式方程P17
- 沪教版八年级下册数学练习册21.4(1)无理方程P18
- 苏教版二年级下册数学《认识东、南、西、北》
- 【部编】人教版语文七年级下册《过松源晨炊漆公店(其五)》优质课教学视频+PPT课件+教案,辽宁省
- 沪教版八年级下册数学练习册20.4(2)一次函数的应用2P8
- 苏科版数学 八年级下册 第八章第二节 可能性的大小
- 外研版英语三起5年级下册(14版)Module3 Unit1
- 冀教版小学数学二年级下册1
- 沪教版牛津小学英语(深圳用) 四年级下册 Unit 2
精品推荐
分类导航
编程开发子分类
最新mysql数据库学习