You have the following in your my.cnf configuration file:
[mysqld]
default_authentication_plugin=sha256_password
You want to create a new user who will be connecting from the IP address 192.0.2.10, and you want to use the authentication plug-in that implements SHA-256 hashing for user account passwords.
Which two statements would create a user named webdesign for this IP address with the password of imbatman using a SHA_256 password hash?
A. CREATE USER ‘webdesign’@’192.0.2.10’ IDENTIFIED AS sha256_user WITH sha256_password ‘imbatman’;
B. CREATE USER ‘webdesign’@’192.0.2.10’ IDENTIFIED BY ‘iambatman’;
C. CREATE USER ‘webdesign’@’192.0.2.10’ IDENTIFIED WITH sha256_password BY
‘imbatman’;
D. CREATE USER WITH sha256_password ‘sha256_user’@’192.0.2.10’ IDENTIFIED AS
‘webdesign’ USING ‘imbatman’;
E. CREATE USER ‘webdesign’@’192.0.2.10’ WITH mysql_native_password USING SHA265 BY
‘imbatman’;
F. CREATE USER ‘webdesign’@’192.0.2.10’ IDENTIFIED BY SHA265 AS ‘imbatman’;
Answer: BC
My.cnf文件中的配置如下:
[mysqld]
default_authentication_plugin=sha256_password
你想为192.0.2.10这个IP地址创建一个新的用户,并且使用SHA-256这个认证插件来对密码进行hash。下面哪两个语句能够实现你的需求(用户名为webdesign)?
因为在/etc/my.cnf文件里面设置了default_authentication_plugin=sha256_password,所以B、C效果一样。
版权声明:本文为博主原创文章,未经博主允许不得转载。
MYSQL
- 上一篇:Mysql OCP 36题
- 下一篇:Mysql OCP 38题



