Bug #80144 Installation provides user with non-working root password
Submitted: 26 Jan 2016 1:39 Modified: 29 Oct 2018 18:21
Reporter: C D Tavares Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.7.10 OS:MacOS
Assigned to: CPU Architecture:Any

[26 Jan 2016 1:39] C D Tavares
Description:
Installing MySQL Community Server 5.7.10 for the first time on brand new El Capitan machine.

Downloaded Mac OS X 10.10 (x86, 64-bit), DMG Archive (mysql-5.7.10-osx10.10-x86_64.dmg).

Ran installation successfully.  At end of installation, dialog box was displayed containing randomized password for root account.

Attempted to access root account to create tables.  Was immediately informed that this root password had already expired, and I had to use a client that handled expired passwords in order to change it.

How to repeat:
Trivially reproducible following instructions in previous section.

Suggested fix:
If you are going to provide people with randomized passwords that have expiration dates, you should at least ensure that the expiration date is relative to the installation date, not the date the installation package was created.
[26 Jan 2016 12:05] MySQL Verification Team
Thank you for the bug report. After the install and first login you changed the temporary password? i.e:

miguel:~ miguel$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 5.7.10

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> set password = "new_password";
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
miguel:~ miguel$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 5.7.10 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
[26 Jan 2016 17:49] C D Tavares
Yes, though I used mysqladmin.  The point is, I shouldn't have had to do that; or, if for some reason you actually desire that all new users should be forced to do this immediately upon installation, then you should include explicit instructions, and not force the new user through a web search treasure hunt for the proper commands before being able to use his new product. You don't even provide the command to be used -- you just refer vaguely to "some command that processes expired passwords," leaving the newbie to guess what this might be.  Hope this is clearer.
[27 Jan 2016 11:20] MySQL Verification Team
Thank you for the feedback.
[14 Aug 2018 3:29] Glen McAllister
Hi - please forgive any mis-understanding on my part, but how can you login to the server with the (expired) temporary pw in either the mysql or mysqladmin client?
[14 Aug 2018 3:34] C D Tavares
Heavens, I reported this bug well over two years ago.  You're asking a lot of my memory.

I don't remember what password (if any) I presented to mysqladmin over two years ago.

I provided instructions as to how to duplicate this error on demand.  The exact details of how I managed to recover from the error is at best a second-order issue.
[29 Oct 2018 18:21] Paul DuBois
Posted by developer:
 
Fixed in 8.0.11.

The macOS installer now asks the user for the root password to use
rather than generating a random one.