Bug #90429 Windows Installer cannot complete configuration
Submitted: 13 Apr 2018 11:15 Modified: 19 Apr 2018 14:24
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: Installer Severity:S3 (Non-critical)
Version:1.4.23.0 OS:Windows (10 Pro 64 bit)
Assigned to: CPU Architecture:Any

[13 Apr 2018 11:15] Peter Laursen
Description:
I wanted to reopen https://bugs.mysql.com/bug.php?id=89382 "Windows Installer cannot complete configuration" but as this is not possible I am creating a new report. I still face exactly the smae problem, have not been able to resolve it but I have a little more information. 

How to repeat:
Run the configuration wizard bundled with teh Installer and try to configure MySQL 8.0.4.  It stops after writing a my.ini but before a /datadir is populated. 

In the log I find:

Beginning configuration step: Initializing Database [if necessary]
Deleting the data directory from a previous (failed) configuration...
Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.4...
Starting process with command: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --console --initialize-insecure=on...
2018-04-09T13:04:07.922569Z 0 [Warning] [MY-011071] option 'read_buffer_size': unsigned value 0 adjusted to 8192
2018-04-09T13:04:07.922608Z 0 [Warning] [MY-011071] option 'read_rnd_buffer_size': unsigned value 0 adjusted to 1
2018-04-09T13:04:07.922666Z 0 [Warning] [MY-010915] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2018-04-09T13:04:07.922710Z 0 [ERROR] [MY-010177] Can't start server: Invalid value for --default-authentication-plugin  --<<--- note this!
2018-04-09T13:04:07.923248Z 0 [ERROR] [MY-010119] Aborting
Process for mysqld, with ID 1448, was started successfully and exited with code 1.
Database initialization failed.
Ended configuration step: Initializing Database [if necessary]

Inpecting the newly (by the Installer) generated my.ini  I find this 

default_authentication_plugin=0.0

.. what obiuvosly is an invalid invalid plugin specification. So the log makes sense. I can edit the my.ini to use a valid plugin like "mysql_native_password", but a new my.ini is created with same error next time I run the configurator.

Suggested fix:
There must be specific circumstances that cause the installer write such invalid line. I have not been able to identify those, however. 

I also think I recently saw another report here where a similar invalid line was created. I cannot identify this reprot, but I believe that this also was on Windows, but if I am right it did not involve the isntaller. Instead "mysqld --initialize-insecure" was invoded from terminal.

I think this should be checked with a critical code review, as I think it is very unlikely that it can be reproduced on most environments. And if any "workaround" is possible I would like to know it.
[18 Apr 2018 13:21] Chiranjeevi Battula
http://bugs.mysql.com/bug.php?id=90493 marked as duplicate of this one.
[18 Apr 2018 19:53] Javier Treviño
Thanks for the bug report Peter.
The workaround is to replace the 0.0 value in the configuration file with any valid value here:
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authen...

I strongly believe this bug has been already fixed in the MySQL Installer version that will be released soon (can't disclose release dates).  I will remind myself of asking you if you can confirm the problem is not present anymore after the release is done.
[19 Apr 2018 8:36] Peter Laursen
To this "The workaround is to replace the 0.0 value in the configuration file with any valid value here .."  Ialready told "I can edit the my.ini to use a valid plugin like "mysql_native_password", but a new my.ini is created with same error next time I run the configurator."

Maybe I can
1) let the Installer write the my.ini - and quit it when the error occurs
2) edit the my.ini replacing the plugin spec
3) run "mysqld --initialize-insecure" manually
4) start the server.

I did not try this. I am also not supposed to. The Installer and the bundled configurator should work.
[19 Apr 2018 14:14] Peter Laursen
I can confirm that the new Installer version 1.4.25.0 was able to install and configure MySQL 8.0.11.

It may not matter, but I chose the 'compability' option for default authentication (ie. no **sha** default authentication plugin.

You may close here.
[19 Apr 2018 14:23] Javier Treviño
Thanks for checking Peter.

The second thing you hit when you checked the workaround was also a bug that got fixed in 1.4.25. You were right, you are not supposed to have to do any weird acrobatics in order to get the configuration working.
[19 Apr 2018 14:24] Javier Treviño
This got fixed in version 1.4.25.