I've configured an InnoDB MySQL v8.0.19 Group Replication Cluster in single-primary mode. I have several webapps accessing the cluster via their own MySQL Router instance in a 1:1 relationship, as per the suggested pattern.
Everything appears to be working fine, but the logs for my primary server are being filled with the following message:
[Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
Dumping the mysql.user table, I see that the generated mysql_router users are using the 'mysql_native_password' plugin, and all other users are using the correct 'caching_sha2_password' plugin.
These mysql routers are the only clients accessing the server, so I suspect it's complaining about how it's accessing the cluster.
Anyone know how to fix this warning?
I had the same problem, that the warning was filling up my error log, and also none of the users in the mysql.user table was using the sha256_password. As explained in this blog post, the warning is misleading, the problem was an unregistered user that is trying to login to MySQL.
The reason we see the warning about the sha256_password, rather than an access denied error, is because:
when a user name is not found, MySQL assigns an authentication plugin randomly and proceed with authentication, to finally deny it
As described in the above linked blog post, you can use the connection control plugin to identify the unregistered user:
INSTALL PLUGIN CONNECTION_CONTROL SONAME 'connection_control.so';
INSTALL PLUGIN CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS SONAME 'connection_control.so';
select * from information_schema.CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS;
ALTER USER can change the authentication plugin:
ALTER USER usernmae#remoteip
IDENTIFIED WITH 'caching_sha2_password'
RETAIN CURRENT PASSWORD
Related
I am trying to enable the mysqlx plugin in my company's MySQL Azure database, so that I can use the JSON import utility in MySQL Shell.
The server version is 8.0, for which mysqlx is enabled by default. However, executing SHOW PLUGINS reveals that mysqlx is DISABLED:
mysqlx is disabled for the server
MySQL documentation states that this plugin can be enabled by executing -- mysqlx=ON in the MySQL shell, but for me this just returns the SyntaxError: Invalid left-hand side in assignment.
I also consulted this Stack Overflow page, but the proposed solution requires installing a file, which I do not have the permission to do, even though I am using the server admin account: Error Code: 1044. Access denied for user 'user'#'%' to database 'mysql'.
Any suggestions for how to activate this plugin would be appreciated!
It is not supported in Azure DB for MySQL today, I would recommend to upvote this item for product team to prioritize exposing this plugin
https://feedback.azure.com/d365community/idea/53d0aec7-482c-ed11-a81b-6045bd853c94
I have MySQL database up and running with the caching_sha2_password authentication.
It allows for creating users with the standard password authentication (mysql_native_password) but when trying to connect from a remote host with standard auth the user I'm getting 'The server requested authentication method unknown to the client [caching_sha2_password]...' error anyway.
Is it possible to use the legacy authentication for selected users even if the server supports caching_sha2_password.
The reason would be e. g. using strong authentication for the root and standard for the other accounts with limited access to single schemas.
(Version 8.0.16 GPL)
You can specify the authentication method for each user individually in the plugin column of the mysql.user table. Check the documentation 6.2.3 Grant Tables - The user and db Tables:
The server uses the plugin named in the plugin column of an account row to authenticate connection attempts for the account.
Turned out that problem was on the client side – PHP 7 compatibility issues with MySQL 8.
Helpful link: https://github.com/laradock/laradock/issues/1130
After upgrading PHP to 7.3 my problem vanished.
I installed mysql-8.0.11-winx64 and SQLyog-13.0.1-0.x64Community in my Windows-10 laptop. When trying to connect SQLyog with MySQL database using root user not connecting. Showing this error:
I could resolve this issue by creating another user through the following query:
create user '[USERNAME]'#'%' identified with mysql_native_password by '[PASSWORD]';
I could understand Oracle has made default authentication type caching_sha2_password in MySQL-8. I found article here:
In MySQL 5.7, the default authentication plugin is
mysql_native_password. As of MySQL 8.0, the default authentication
plugin is changed to caching_sha2_password.
Please find the complete article here:
https://dev.mysql.com/doc/refman/5.7/en/caching-sha2-pluggable-authentication.html
Another way to resolve this issue, we can alter the user by changing authentication type from default caching_sha2_password to mysql_native_password. This is the similar way to do:
Authentication plugin 'caching_sha2_password' cannot be loaded
If you want to keep the "fancy" caching_sha2_password credential plugin, you may upgrade (if you are able) your SQLyog to 13.1.3 or later.
Quoted from Version-History - 2019 of SQLyog
--The “caching_sha2_password” authentication plugin (default in recent MySQL 8 servers) is now supported.
When I try to connect to server on MySQL Workbench, I get the error saying
Your connection attempt failed to user 'root' from your host to server as localhost:3306:
Authentication plugin caching_sha2_password cannot be loaded:
The specified module could not be found.
It seems like I do not have the module for caching_sha2_password installed. How do I install this plugin?
I tried to follow steps provided here. But this is my first interaction with MySQL, so I did not understand the steps.
For example, under Using SHA-2 Pluggable Authentication, it says
"storing those values in the plugin and authentication_string columns of the > mysql.user system table."
But where is the mysql.user system table and how do I access it and store the values?
Any help would be greatly appreciated!
You are looking at the wrong places. The story is this:
MySQL 8 introduced a new authentication method: caching_sha2_password which improves performance (hence the caching) for a secure authentication (the sha2 hashing). This breaking change had been made the default for new accounts pretty late so that MySQL Workbench (and quite a number of other client tools) could not be made ready for it when MySQL 8.0.11 was released. Unprepared client applications/libraries will show the mentioned error.
Many of the socalled "solutions" simply recommend to switch the authentication method to the older, less secure one (MySQL native). This is rather a hack than a solution. And keep in mind this only applies to new accounts which by default use the new auth method. Existing accounts (e.g. when you upgrade an older server to 8.0) still work as before, unless you explicitly changed the user's auth method.
Meanwhile MySQL Workbench catched up here and there's a release candidate (MySQL Workbench 8.0.11 RC) available on the MySQL download page (see the "Development Releases" tab). Use that for your 8.x server. A GA version will follow soon.
MySQL has a plugin that allows user authentication against current user’s Windows credentials. The plugin is ‘authentication_windows.dll’.
I get the following error message from SQLyog:
Error No. 2058 Plugin authentication_windows_client could not be
loaded: The specified module could not be found.
The “authentication_windows_client” is a dll that is supposed to be loaded on the client side. Actually I think that SQLyog is looking for an older dll which has been replaced by MySQL with ‘libmysql.dll’.
How do I make SLQyog load the correct dll?
Sqlyog included clear text and dialog plugin but due to license issue the are not able to support window authentication plugin.
so either you may purchase the product or go for crack otherwise you cannot use sqlyog along side with mysql until someone is not cracking...
Error analysis
Error information translation:
"Plug-in Cache - SHA2_ Password Unable to load"
The reason is that the SQLYOG failed to correctly parse the use of the mysql password encryption method.
Solution
Log in to mysql in the CMD command line (need to configure environment variable in advance), perform the following code
Connect MySQL sheel to localserver
\connect root#localhost
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password BY 'your password';
This is for the root account, if other accounts also have the same problem, modify to correspond to the username and password, execute the statement