4273 Joerg Bruehe 2012-10-02
"mysql_install_db" (Perl variant):
If the random password has been set for the root account,
the final message should reflect that.
modified:
scripts/mysql_install_db.pl.in
4272 Joerg Bruehe 2012-10-01
Minor issues found during testing the fix for bug# 12794345.
@ scripts/mysql_install_db.pl.in
1) Have the comment "random password set ..." and the password on the same line,
this will make it easy and safe to extract the password via some script
(sed command, ...) which is needed for automated testing.
2) Catch an empty password. This will happen if there is no "/dev/urandom"
(like in chroot environments used for verification). There is little use
in setting an ampty password, and it may break all kinds of things.
@ support-files/mysql.spec.sh
Fix an inconsistency: "new install" vs "upgrade" are told from the (non)existence
of "$mysql_datadir/mysql" (holding table "mysql.user" and other system stuff).
modified:
scripts/mysql_install_db.pl.in
support-files/mysql.spec.sh
=== modified file 'scripts/mysql_install_db.pl.in'
--- a/scripts/mysql_install_db.pl.in 2012-10-01 11:15:15 +0000
+++ b/scripts/mysql_install_db.pl.in 2012-10-02 11:50:20 +0000
@@ -686,22 +686,43 @@ if ( open(PIPE, "| $mysqld_install_cmd_l
# set a password after installing the data files on the real host system.
# At this point, there is no end user, so it does not make sense to print
# this reminder.
- report($opt,
- "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !",
- "To do so, start the server, then issue the following commands:",
- "",
- " $bindir/mysqladmin -u root password 'new-password'",
- " $bindir/mysqladmin -u root -h $hostname password 'new-password'",
- "",
- "Alternatively you can run:",
- "",
- " $bindir/mysql_secure_installation",
- "",
- "which will also give you the option of removing the test",
- "databases and anonymous user created by default. This is",
- "strongly recommended for production servers.",
- "",
- "See the manual for more instructions.");
+ if ( $opt->{'random-passwords'} ) {
+ report($opt,
+ "A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !",
+ "You will find that password in '$secret_file'."
+ "",
+ "You must change that password on your first connect,",
+ "no other statement but 'SET PASSWORD' will be accepted."
+ "See the manual for the semantics of the 'password expired' flag."
+ "",
+ "Also, the account for the anonymous user has been removed.",
+ "",
+ "In addition, you can run:",
+ "",
+ " $bindir/mysql_secure_installation",
+ "",
+ "which will also give you the option of removing the test database.",
+ "This is strongly recommended for production servers.",
+ "",
+ "See the manual for more instructions.");
+ } else {
+ report($opt,
+ "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !",
+ "To do so, start the server, then issue the following commands:",
+ "",
+ " $bindir/mysqladmin -u root password 'new-password'",
+ " $bindir/mysqladmin -u root -h $hostname password 'new-password'",
+ "",
+ "Alternatively you can run:",
+ "",
+ " $bindir/mysql_secure_installation",
+ "",
+ "which will also give you the option of removing the test",
+ "databases and anonymous user created by default. This is",
+ "strongly recommended for production servers.",
+ "",
+ "See the manual for more instructions.");
+ }
if ( !$opt->{rpm} )
{
No bundle (reason: useless for push emails).

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.