mysql ocp 1z0-888 每日一题(47)

Q42
Due to an authentication plug-in that is used on the server, passwords are required to be sent as
clear text as opposed to the usual encrypted format.
Which two methods would allow the mysql client to connect to the server and send clear text
passwords?
A. mysql --protocol=PLAIN –uroot –p –h dbhost.example.com
B. INSTALL PLUGIN mysql_cleartext_password SONAME ‘mysql_cleartext_password.so’;
C. export LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN=’Y’
D. SET GLOBAL mysql_cleartext_passwords=1;
E. mysql --enable-cleartext-plugin –uroot –p –h dbhost.example.com

解析:

https://dev.mysql.com/doc/refman/5.7/en/cleartext-pluggable-authentication.html

To make inadvertent use of the mysql_clear_password plugin less likely, MySQL clients must explicitly enable it. This can be done in several ways:

  • Set the LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN environment variable to a value that begins with 1Y, or y. This enables the plugin for all client connections.

  • The mysqlmysqladmin, and mysqlslap client programs (also mysqlcheckmysqldump, and mysqlshow for MySQL 5.7.10 and later) support an --enable-cleartext-plugin option that enables the plugin on a per-invocation basis.

  • The mysql_options() C API function supports a MYSQL_ENABLE_CLEARTEXT_PLUGIN option that enables the plugin on a per-connection basis. Also, any program that uses libmysqlclient and reads option files can enable the plugin by including an enable-cleartext-plugin option in an option group read by the client library.

A 错,无此用法

D 错,无此参数

C E 对
Answer: D,E

猜你喜欢

转载自blog.csdn.net/AkiFreeman/article/details/85854608