Which statement is true about this scenario?

You install a copy of Mysql 5.6.13 on a brand new Linux server by using RPM packages. The
server starts successfully as verified by the following commands:
$ pidof mysqld
3132
$tail – n2 /var/lib.mysql/hostname.err
2013-08-18 08:18:38 3132 [Note] /usr/sbin/mysqld: ready for connections.
Version: ‘5.6.13-enterprise-commercial-advaced’ socket: ‘/tmp/mysql.sock’ port;
3306 Mysql Enterprise Server – Advanced Edition (Commercial)
You attempt to log in as the root user with the following command:
$mysql –u root
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)

Which statement is true about this scenario?

You install a copy of Mysql 5.6.13 on a brand new Linux server by using RPM packages. The
server starts successfully as verified by the following commands:
$ pidof mysqld
3132
$tail – n2 /var/lib.mysql/hostname.err
2013-08-18 08:18:38 3132 [Note] /usr/sbin/mysqld: ready for connections.
Version: ‘5.6.13-enterprise-commercial-advaced’ socket: ‘/tmp/mysql.sock’ port;
3306 Mysql Enterprise Server – Advanced Edition (Commercial)
You attempt to log in as the root user with the following command:
$mysql –u root
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)

Which statement is true about this scenario?

A.
The RPM installation script sets a default password of password for new installations.

B.
The local root user must log in with a blank password initially: mysql –u root –p.

C.
New security measures mean that the mysql_secure_installation script must be run first on all
new installations.

D.
The mysql_install_bd post-installation script used – random-password.

Explanation:



Leave a Reply 15

Your email address will not be published. Required fields are marked *


Prakash

Prakash

A.
RPM Installation will set a default password and it will store the password in $HOME/.mysql_secret file

py

py

答案:D
分析:
MySQL5.6 Linux RPM包安装中会调用带有–random-passwords参数项的mysql_install_db脚本命令, 为root用户生成一个随机密码,并保存在$HOME/.mysql_secret文件中。
A错,生成的是一个随机密码,而非默认密码。B错,因为本地root用户已经有一个生成的密码了,因此空密码是不能登陆成功的。
C错,mysql_secure_installation是一个非必要脚本,在MySQL安装完成后,你可以运行此脚本来进一步增强其安全策略。

Vince

Vince

Agree with A. But the password is set to a random password and not set to ‘password’
I think D.

LnL

LnL

D

LnL

LnL

Not A, It sets a random password not password.
Not B, blank password and -p don’t make sense.
Not C, you don’t have to run it if you don’t want to.

karthik R

karthik R

B is teh right answer, As it is not mysql_secure_installation, it will be started with blank password. We need to set password on our first login

dash-68

dash-68

B is definitely the right answer

Malika

Malika

D

When rpms are installed, mysql_install_db generates a random password and stores it in .mysql_secret file. So using that password we can login to the server first time and then change root password.

Rajareddy VN

Rajareddy VN

Answer should be ‘A’ because rpm installation will gives us random password $HOME/.mysql_secret file(They have clearly mentioned it’s a rpm installation)

‘D’ will be wrong because, in generic binaries installation only we need to mention ‘mysql_install_db –random-password to initialize the data-directory(They have clearly mentioned it’s a rpm installation, so no need to initialize the data-directory)
.