天成岩寺寺入山崖石做瓦,佛观殿外嶂连崖。碧空崖上水滴泄,胜似阳春雨打葩。
有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客户端不输入用户名和密码直接连接数据库的2个方法请关注haodaima.com其它相关文章!
以下您可能有感兴趣的文章:
MySQL最新文章
- MySQL热点排行
- Mac环境mysql5.7.21utf8编码问题及如何解决方案
- 64位Win10系统安装Mysql5.7.11的方法(案例详解)
- 如何使用mss2sql工具将SqlServer转换为Mysql全记录
- 如何使用mysqldump导入数据和mysqldump增量备份(mysqldump如何使用方法)
- mysql运行netstartmysql报服务名无效的如何解决办法
- CentOS下RPM方式安装MySQL5.6好代码教程
- windows下忘记mysqlroot密码的更改方法
- 更新text字段时出现Rowsizetoolarge报错应付措施
- MySQL8.0.11安装总结好代码教程图解
- mysql导入文件数据