签到成功

知道了

CNDBA社区CNDBA社区

Mysql OCP第11题

2021-12-12 15:50 1156 0 原创 mysql
作者: hbhe0316

Host slave1 has ip address 192.0.2.10.
Host slave2 has ip address 203.0.113.50
Examine these commands:
http://www.cndba.cn/hbhe0316/article/22749http://www.cndba.cn/hbhe0316/article/22749

http://www.cndba.cn/hbhe0316/article/22749
http://www.cndba.cn/hbhe0316/article/22749

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

http://www.cndba.cn/hbhe0316/article/22749

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

http://www.cndba.cn/hbhe0316/article/22749

[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, 密码输入对了也是可以登录的http://www.cndba.cn/hbhe0316/article/22749http://www.cndba.cn/hbhe0316/article/22749

http://www.cndba.cn/hbhe0316/article/22749

版权声明:本文为博主原创文章,未经博主允许不得转载。

MYSQL

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
hbhe0316

hbhe0316

关注

1.只有承认无知,才能装下新的东西; 2.进步来自一点点滴滴的积累; 3.广博让你更优秀,而专业让你无法替代; 4.挫折和失败能够转换为一种财富。

  • 889
    原创
  • 1
    翻译
  • 13
    转载
  • 24
    评论
  • 访问:2649900次
  • 积分:1523
  • 等级:核心会员
  • 排名:第6名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ