Bug #75859 m_i_db should run with -v option with deployment scripts to get root password
Submitted: 11 Feb 2015 6:51 Modified: 18 Mar 2015 14:33
Reporter: Ramana Yeruva Email Updates:
Status: Closed Impact on me:
Category:MySQL Package Repos Severity:S3 (Non-critical)
Version:5.7.5 OS:Any
Assigned to: CPU Architecture:Any

[11 Feb 2015 6:51] Ramana Yeruva
currently there is no information in logs on where root password is generated while starting service with deployment scripts though it gets generated in $HOME/.mysql_secret path

How to repeat:
install sles11 or sles12 or EL7 new style rpms and start service to bring the server up and observe systemd log or service log for root password generated by default

Suggested fix:
currently for sles11,mysql_install_db executed with 
/usr/bin/mysql_install_db --datadir="$datadir" --user=mysql option with which user will not get to know where root password is generated.
instead it should run with 
/usr/bin/mysql_install_db --datadir="$datadir" --user=mysql -v

vitro16:~/ramana # service mysql start
2015-02-11 07:35:10 [NOTE]    Using existing directory /var/lib/mysql
2015-02-11 07:35:10 [NOTE]    Generating random password to /root/.mysql_secret...done.
2015-02-11 07:35:10 [NOTE]    Setting file ownership to mysql
2015-02-11 07:35:10 [NOTE]    Executing /usr/sbin/mysqld --no-defaults --bootstrap --datadir=/var/lib/mysql --lc-messages-dir=/usr/share/mysql --lc-messages=en_US
2015-02-11 07:35:16 [NOTE]    Creating system tables...done.
2015-02-11 07:35:16 [NOTE]    Filling system tables with data...done.
2015-02-11 07:35:23 [NOTE]    Filling help table with data...done.
2015-02-11 07:35:23 [NOTE]    Creating default user root@localhost
2015-02-11 07:35:23 [NOTE]    Creating default proxy root@localhost
2015-02-11 07:35:27 [NOTE]    Success!
Starting service MySQL:                                                                                                                                         done

for FC,SLES12,EL7 where systemd being used to start service in /usr/bin/mysql-systemd-start,also m_i_db should run in verbose mode to get root password path.
[18 Mar 2015 14:33] Paul Dubois
Noted in 5.7.6 changelog.

For RPM-based installation operations, no information was produced to
indicate that mysql_install_db wrote the initial root password to
$HOME/.mysql_secret. These operations now use mysqld --initialize,
which writes the password to the standard error output.