Bug #91482 | db mysql > table user > column plugin default caching_sha2_password missing/wron | ||
---|---|---|---|
Submitted: | 29 Jun 2018 1:46 | Modified: | 29 Jun 2018 4:15 |
Reporter: | Sarah Schieffer Riehl | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Security: Privileges | Severity: | S2 (Serious) |
Version: | 8.0.11 | OS: | MacOS (High Sierra 10.13.5) |
Assigned to: | CPU Architecture: | Any |
[29 Jun 2018 1:46]
Sarah Schieffer Riehl
[29 Jun 2018 2:25]
Sarah Schieffer Riehl
When I actually did the workaround, it turns out it doesn't work to change the plugin AFTER the user exists unless you can do some voodoo to change the password at the same time (I guess because with a different auth plugin the hash is wrong). So the workaround that worked was from the clean install, BEFORE starting mysql or running mysql_secure_installation, go to /usr/local/etc/my.cnf, & under [mysqld], add default_authentication_plugin=mysql_native_password. Interestingly, this doesn't change the plugin column default in the actual user table. I guess it sets the type in the added record on its way into the table.
[29 Jun 2018 2:40]
Sarah Schieffer Riehl
Looks like you actually need to make that change to /usr/local/etc/my.cnf BEFORE installing. My file looks like this # Default Homebrew MySQL server config [mysqld] # overwrite plugin error default_authentication_plugin=mysql_native_password # Only allow connections from localhost bind-address = 127.0.0.1
[29 Jun 2018 4:15]
MySQL Verification Team
Hello Sarah, Thank you for the report. Imho this is not a bug but expected behavior. Quoting from our manual - "If your MySQL installation must serve pre-8.0 clients and you encounter compatibility issues after upgrading to MySQL 8.0 or higher, the simplest way to address those issues and restore pre-8.0 compatibility is to reconfigure the server to revert to the previous default authentication plugin (mysql_native_password). For example, use these lines in the server option file: [mysqld] default_authentication_plugin=mysql_native_password That setting enables pre-8.0 clients to connect to 8.0 servers until such time as the clients and connectors in use at your installation are upgraded to know about caching_sha2_password. However, the setting should be viewed as temporary, not as a long term or permanent solution, because it causes new accounts created with the setting in effect to forego the improved authentication security provided by caching_sha2_password." more details here - https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-cachin... Thanks, Umesh
[4 Jul 2018 18:19]
Abdelkarim Mateos
With original MySQL 8 dmg or wuth brew package best way for use mysql_native_password is edit launchDaemon file adding `<string>--default_authentication_plugin=mysql_native_password</string>` /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist or file installed <key>ProgramArguments</key> <array> <string>/usr/local/mysql/bin/mysqld</string> <string>--user=_mysql</string> <string>--basedir=/usr/local/mysql</string> <string>--datadir=/usr/local/mysql/data</string> <string>--plugin-dir=/usr/local/mysql/lib/plugin</string> <string>--log-error=/usr/local/mysql/data/mysqld.local.err</string> <string>--pid-file=/usr/local/mysql/data/mysqld.local.pid</string> <string>--keyring-file-data=/usr/local/mysql/keyring/keyring</string> <string>--early-plugin-load=keyring_file=keyring_file.so</string> <string>--default_authentication_plugin=mysql_native_password</string>