Linux下巧用my.cnf,mysql连接服务器不需要输入账号密码信息
Linux下每次用mysql连接连接服务器,常常用如下方式:
- [root@localhost ~]# mysql -hlocalhost -uroot -p11111
我们只需要简单地配置下my.cnf的client节即可,把用户名,密码信息都放到client节中。配置示例如下:
- # The following options will be passed to all MySQL clients
- 18 [client]
- 19 host = "localhost"
- 20 password = "11111"
- 21 user = "root"
- 22 port = 3306
- 23 socket = /tmp/mysql.sock
相关推荐
bluecarrot 2020-11-23
Attend 2020-11-17
ZHAICAN 2020-11-16
codedecode 2020-11-14
zhangbingb 2020-11-12
ykmail 2020-11-11
futurezone 2020-11-06
rikeyone 2020-11-04
橄榄 2020-11-04
WenCoo 2020-10-31
liuyuchen 2020-10-27
ROES 2020-10-24
Gexrior 2020-10-22
ZHAICAN 2020-10-20
风语者 2020-10-16
zhongguomin 2020-10-16
净无邪 2020-10-15