Mysql OCP第11题

Host slave1 has ip address 192.0.2.10.

Host slave2 has ip address 203.0.113.50

Examine these commands:

Why did this error occur?

A. The host on the command line is not defined in the login path.

B. The mysqld instance has not been restarted after creating the login path.

C. There is no password defined in the login path.

D. The DNS is not configured correctly for slave1 host.

E. The mylogin.cnf file is not readable.

Answer: C

 

mysql_config_editor 出现在 mysql5.6.6 以后的版本, 可以给指定的连接和密码生成一个加密文件.mylogin.cnf, 默认位于当前用户家目录下。 通过该文件可以使用 mysqlmysqladmin 等直接登录, 避免明文密码出现在脚本中。配置好后的查询命令是:

[root@mysql57 ~]# mysql_config_editor set --user=root --password --host=localhost
Enter password: 

[root@mysql57 ~]# mysql_config_editor print --all
[client]
user = root
password = *****
host = localhost


原题打印的缺失 password,表明没有录入密码, 但是有-p, 密码输入对了也是可以登录的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值