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.
Related
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
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 am working on macOS ver 10.13.5 - the newest one actually.
I usually work with Laravel projects (5.6), and so I am using brew services isntaller to make local enviroment working.
I am using PHP v 7.1.16, MySQL 8.0.11 and Valet in v. 2.0.12
PHP and MySQL installed through Brew.
I've been working without any problems for like 3 months in the past, but the day when I had to reinstall my os finally come.
After reinstalling macOS with the fresh copy, and installing each service in the same version as it's been before, I am getting some weird error while trying to connect to the MySQL database through SequelPro.
Here's some logs:
MySQL said: Authentication plugin 'caching_sha2_password' cannot be
loaded: dlopen(/usr/local/lib/plugin/caching_sha2_password.so, 2): image
not found
That's weird, as I've been working with the same stuff without any problems for quite a while...
So I'd appreciate any advices on how to deal with this problem.
Also I'd like to notice that I've read almost everything about this problem, but I wasn't able to find at least one with configuration like mine (most of them described this problem as while working with local database provided by mysql or some other services provider).
The error message appears because MySQL v8 changed the default authentication plugin / method, which has no backwards compatibility with older clients.
The error can be worked around by using the legacy authentication method, which can be enabled for the root user by doing the following:
After installing MySQL, authenticate using the CLI e.g
mysql -uroot
Then run the following command to use the old authentication method:
ALTER USER root#localhost IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
Lastly, flush the privileges:
FLUSH PRIVILEGES;
Now you should able to connect using SequelPro again (using the specified password).
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.
I've tried to connect to the latest MySQL server 8.0.11 from MySQL workbench, but the error keeps popping up: Cannot connect to MySQL server, authentication plugin: caching_sha2_password: the specified module could not be found.
I tried looking at MySQL server installation videos online and replicated every step accurately, but the error persists.
Any help is greatly appreciated.
I had the following solution:
change my.ini in a [mysqld] section like this:
#default_authentication_plugin=caching_sha2_password (comment line!)
default_authentication_plugin=mysql_native_password (new line)
Connect to your MySQL under root in a command line client
and execute:
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password BY 'xxx';
Where xxx is your current password.
Try to connect your MySQL use terminal, and use this.
mysql > ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';
See:
Changes in MySQL Workbench 8.0.11 (2018-04-19, Release
Candidate)
...
MySQL Workbench now supports the caching_sha2_password authentication plugin introduced in MySQL 8.0 (see Caching SHA-2 Pluggable Authentication). A user account can be reset to use the other available authentication types for making a connection.
...
After poking around I actually found a way to solve it:
During the configuration, when you reach the authentication method choose the Legacy Authentication Method.
It worked for me~!
I was seeing this issue with HeidiSQL, and I found a workaround in the HeidiSQL Github repository:
https://github.com/HeidiSQL/HeidiSQL/issues/163
I fixed by copying libmysql.dll from my last MySql install to my HeidiSQL folder.
If you have just installed mysql server. Run the installer again and it will allow you to reconfigure the options.
On the third sceen it will say
"Use legacy Authentication method"
choose that option
I know it is an old post. This is just to share my experience, hoping it will be useful for someone.
I also faced similar issue.
We can use the portable version of Heidisql. The portable version does not have this issue.
using mysql_native_password is a workaround.
Your client software (MySQL Workbench) does not support the authentication plugin most probably because it is an older version.
https://tableplus.io/blog/2018/07/failed-to-load-caching-sha2-password-authentication-plugin-solved.html
follow the above link.
The actual reason for "caching_sha2_password" is because while installing MySQL under Authentication Method, by default Use Strong Crypted Password radio button is chosen, instead we need to give User Legacy Authentication type password option for password
Run this in MySQL WorkBench:
ALTER USER 'user'#'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Then further edit the credential and schema to access under the below directory path:
ror_project_path/config/database.yml