Wednesday, August 03, 2022

problems with mysql server on Windows Server 2016 and workaround

The latest MySQL community editions - 8.0.22, 8.030 etc - which use installer version 1.6 - don't install properly on Windows Server 2016. They install fine on Windows 11. 

The error seen in the Log tab of the installer is,
Option --authentication-policy was set to an invalid value
(and I suspect when that is corrected, another error comes up.)

By trial and error, found a workaround, which was to install a version which was working fine on Windows Server 2016 - this post uses 8.0.19, so that was working. After the installation, after verifying that the server is running, we can allow the installer to update, and then after the installer updates itself, we can update the server to 8.0.30 without issues. The upgrade does some config file changes, I think. 
 
Some notes:
  1. When reinstalling, we must delete both C:\Program Files\Mysql directory as well as C:\ProgramData\Mysql  before reinstalling if we want a fresh install with a fresh root password.


  2. Found
    c:\programdata\mysql\mysql server 8.0\my.ini
    which had
    authentication_policy=0.0
    According to https://dev.mysql.com/doc/refman/8.0/en/multifactor-authentication.html the valid default should be
    '*,,'
    but in our installation, it is set to 0.0

  3. Tried commenting it out, then tried running from command line as mentioned in the ini file, (but correcting the path),
    mysqld --defaults-file="c:\programdata\mysql\mysql server 8.0\my.ini"
    That  seemed to start, then immediately stop the server. So, no improvement. Probably there were other things wrong for Win Server 2016... 

No comments:

Post a Comment