Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

205

积分

19

好友

29

主题
1#
发表于 2016-7-19 17:23:16 | 查看: 2566| 回复: 0
【dbdao.com MySQL OCP认证专题】- MySQL 5.6 - OCP 考题讲解

10.

You have a login-path named "adamlocal" that was created by using the mysql_config_editor command.
You need to check what is defined for this login_path to ensure that it is correct for your deployment.
You execute this command:
  1. $ mysql_config_editor print –-login-path=adamlocal
复制代码
What is the expected output of this command?

A. The command prints all parameters for the login-path. The password is printed in plain text.
B. The command prints all parameters for the login-path. The password is shown only when you provide the --password option.
C. The command prints all parameter for the login-path. The password is replaced with stars.
D. The command prints the encrypted entry for the login-path. The is only possible to see if an entry exists.

---------------------------------------------------
答案:C

分析:
mysql_config_editor工具命令用于建立外部登陆文件,一般由mysql客户端或应用来使用,好处在于登陆时免去输入登陆密码,密码已经被保存在了登陆文件中。在环境变量MYSQL_TEST_LOGIN_FILE未设置的情况下,mysql_config_editor默认文件名为.mylogin.cnf,且文件保存在执行此命令的用户home目录下。
登陆文件建立后,可直接使用以下命令登陆:
  1. shell> mysql --login-path=login-path
复制代码
当然,--login-path的默认值为client,因此如果你使用mysql_config_editer set --login-path=client 来进行用户密码设置设置,那么登陆所设用户的时候,连--login-path也可不用了:
  1. shell> mysql
复制代码
A, D错,因为不管如何,你都看不到密码的,密码被加密保存后,使用mysql_config_editor print会将密码替代以星号显示。
B错,使用mysql_config_editor --help可知在参数项中没有此--password项,且通过参考文档可知--password是用于设置密码而非显示密码的。
C正确。
dbdao_mysql_item_id657_f5890834a26299ea09036e47a68861307d55abe9.gif

参考:
http://dev.mysql.com/doc/refman/5.7/en/mysql-config-editor.html
您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-4-20 00:21 , Processed in 0.049533 second(s), 24 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569