MySQL 服务器 8.0.12 - 必须为新用户指定身份验证插件
MySQL Server 8.0.12 - An authentication plugin must be specified for new users
我正在尝试在静默模式下使用 MYSQL 社区版 v8.0.12 安装 MySQL 服务器(在 Windows 上)。
我先运行
msiexec /i "mysql-installer-community-8.0.12.0.msi" /qn
然后
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执行日志:
=================== 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.
错误是:"MySQL Server 8.0.12 - An authentication plugin must be specified for new users."
Oracle 似乎没有更新其网站上的 MySQLInstallerConsole 参考参数,有谁知道我如何为 MySQLInstallerConsole 指定 auth 插件?
现在我只是通过不创建用户 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"
我发现将 auth_plugin
设置与 caching_sha2_password
一起使用可以创建用户。
从 MySQL 8.0 开始,caching_sha2_password
是首选和默认的身份验证插件。
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
我也像这样成功安装了其他产品
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:*
部分参考资料:
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
我正在尝试在静默模式下使用 MYSQL 社区版 v8.0.12 安装 MySQL 服务器(在 Windows 上)。
我先运行
msiexec /i "mysql-installer-community-8.0.12.0.msi" /qn
然后
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执行日志:
=================== 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.
错误是:"MySQL Server 8.0.12 - An authentication plugin must be specified for new users."
Oracle 似乎没有更新其网站上的 MySQLInstallerConsole 参考参数,有谁知道我如何为 MySQLInstallerConsole 指定 auth 插件?
现在我只是通过不创建用户 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"
我发现将 auth_plugin
设置与 caching_sha2_password
一起使用可以创建用户。
从 MySQL 8.0 开始,caching_sha2_password
是首选和默认的身份验证插件。
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
我也像这样成功安装了其他产品
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:*
部分参考资料:
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