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 with1
,Y
, ory
. This enables the plugin for all client connections. -
The mysql, mysqladmin, and mysqlslap client programs (also mysqlcheck, mysqldump, 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 aMYSQL_ENABLE_CLEARTEXT_PLUGIN
option that enables the plugin on a per-connection basis. Also, any program that useslibmysqlclient
and reads option files can enable the plugin by including anenable-cleartext-plugin
option in an option group read by the client library.
A 错,无此用法
D 错,无此参数
C E 对
Answer: D,E