Oracle Database MySQL 5.6 Database Administrator — Question 2

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?

Answer options

Correct answer: B

Explanation

The correct answer is B because, in many MySQL installations, the root user does not have a password set initially, allowing access with a blank password. Option A is incorrect since there is no default password set by RPM. Option C is misleading; while running mysql_secure_installation is good practice, it is not a requirement for initial access. Option D is also wrong as it does not pertain to the initial login process.