I am connecting MySQL - 8.0 with MySQL Workbench and getting the below error:
Authentication plugin \'caching_sha2_password\' cannot be loaded: dlop
Note: For MAC OS
Open MySQL Command Line Client
Create a new user with a new pass
Considering an example of a path to a bin folder on top, here's the code you need to run in the command prompt, line by line:
cd C:\Program Files\MySQL\MySQL Server 5.7\bin
MySQL -u root -p
current password...***
CREATE USER 'nativeuser'@'localhost'
IDENTIFIED WITH mysql_native_password BY 'new_password';
Set up a new local host connection with the user name mentioned above (native user), login using the password (new_password)
Courtesy: UDEMY FAQs answered by Career365 Team
If you are getting this error on GitLab CI like me: Just change from latest to 5.7 version ;)
# .gitlab-ci.yml
rspec:
services:
# - mysql:latest (I'm using latest version and it causes error)
- mysql:5.7 #(then I've changed to this specific version and fix!)
Almost like answers above but may be in simple queries, I was getting this error in my spring boot application along with hibernate after MySQL upgrade. We created a new user by running the queries below against our DB. I believe this is a temp work around to use sha256_password instead of latest and good authentication caching_sha2_password.
CREATE USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'pa$$word';
GRANT ALL PRIVILEGES ON * .* TO 'username'@'localhost';
The below solution worked for me
Go to Mysql Workbench -> Server-> Users and Privileges 1.Click Add Account
2.Under Login Tab provide new details and make sure to choose the Authentication Type as standard and choose respective administrative roles and Schema Privileges
If you are trying to connect to a MySQL server from a text-based MySQL client from another computer (be it Docker or not)
Most answers here involve connecting from a desktop client, or ask you to switch to an older authentication method. If you're connecting it with the MySQL client (text-based), I made it work with a Debian Buster in a Docker container.
Say you have the apt system and wget set up, do the following:
sudo apt-get update
sudo apt-get install lsb-release -y
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
and select the options you want. In my case I only need MySQL Tools & Connectors
to be enabled.sudo apt-get update
sudo apt-get install mysql-client -y