Search code examples
mysqlsilent-installer

MySQL Server 8.0.12 - An authentication plugin must be specified for new users


I am trying to install MySQL Server (on Windows) using MYSQL community edition v8.0.12 in silent mode.

I first run

msiexec /i "mysql-installer-community-8.0.12.0.msi" /qn

Then

MySQLInstallerConsole community install -silent server;8.0.12;x64:*:type=config;
openfirewall=true;generallog=true;binlog=true;serverid=3306;enable_tcpip=true;port=3306;
rootpasswd=Unkn0wN;installdir="C:\MySQL\MySQL Server 8.0":type=user;username=foo;
password=bar;role=DBManager

MySQLInstallerConsole.exe execution log:

=================== Start Initialization ===================
MySQL Installer is running in Community mode

Attempting to update manifest.
Initializing product requirements
Loading product catalog
Checking for product catalog snippets
Checking for product packages in the bundle
Categorizing product catalog
Finding all installed packages.
Your product catalog was last updated at 9/16/2018 5:20:01 PM
=================== End Initialization ===================     

MySQL Server 8.0.12 - An authentication plugin must be specified for new users.

The error is: "MySQL Server 8.0.12 - An authentication plugin must be specified for new users."

Oracle doesn't seem to have updated the MySQLInstallerConsole reference parameters on its website, does anyone know how i can specify an auth plugin for MySQLInstallerConsole ?

For now i am just working around it by not creating user foo.

MySQLInstallerConsole community install -silent server;8.0.12;x64:*:type=config;
openfirewall=true;generallog=true;binlog=true;serverid=3306;enable_tcpip=true;port=3306;
rootpasswd=Unkn0wN;installdir="C:\MySQL\MySQL Server 8.0";datadir="C:\MySQL\data"

Solution

  • I discovered that using the auth_plugin setting with caching_sha2_password allowed for creating a user.

    As of MySQL 8.0, caching_sha2_password is both the preferred and the default authentication plugin.

    MySQLInstallerConsole community install -silent server;8.0.21;x64:*:^
    type=config;openfirewall=false;generallog=true;binlog=true;^
    serverid=3306;enable_tcpip=true;port=3306;rootpasswd=Unkn0wN;^
    installdir="C:\MySQL\MySQL80";datadir="C:\MySQL\Data":^
    type=user;username=foo;password=bar;role=DBManager;auth_plugin=caching_sha2_password
    

    I've also been successful at installing other products like so

    MySQLInstallerConsole community install -silent ^
    workbench;8.0.21;x64:* ^
    shell;8.0.21;x64:* ^
    connector/ODBC;8.0.21;x64:* ^
    connector/J;8.0.21;x86:* ^
    connector/C++;8.0.21;x64:* ^
    connector/NET;8.0.21;x86:*
    

    Some references:

    https://dev.mysql.com/doc/refman/8.0/en/authentication-plugins.html https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password