I am connecting MySQL - 8.0 with MySQL Workbench and getting the below error:
Authentication plugin \'caching_sha2_password\' cannot be loaded: dlop
For Windows 10,
Modify my.ini
file in C:\ProgramData\MySQL\MySQL Server 8.0\
[mysqld]
default_authentication_plugin=mysql_native_password
Restart the MySQL Service.
Login to MySQL on the command line, and execute the following commands in MySQL:
Create a new user.
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
Grant all privileges.
GRANT ALL PRIVILEGES ON * .* TO 'user'@'localhost';
Open MySQL workbench, and open a new connection using the new user credentials.
I was facing the same issue and this worked.
Open my sql command promt:
then enter mysql password
finally use:
ALTER USER 'username'@'ip_address' IDENTIFIED WITH mysql_native_password BY 'password';
refer:https://stackoverflow.com/a/49228443/6097074
Thanks.
This error comes up when the tool being used is not compatible with MySQL8, try updating to the latest version of MySQL Workbench for MySQL8
Ok, wasted a lot of time on this so here is a summary as of 19 March 2019
If you are specifically trying to use a Docker image with MySql 8+, and then use SequelPro to access your database(s) running on that docker container, you are out of luck.
See the sequelpro issue 2699
My setup is sequelpro 1.1.2 using docker desktop 2.0.3.0 (mac - mojave), and tried using mysql:latest (v8.0.15).
As others have reported, using mysql 5.7 works with nothing required:
docker run -p 3306:3306 --name mysql1 -e MYSQL_ROOT_PASSWORD=secret -d mysql:5.7
Of course, it is possible to use MySql 8+ on docker, and in that situation (if needed), other answers provided here for caching_sha2_password
type issues do work. But sequelpro is a NO GO with MySql 8+
Finally, I abandoned sequelpro (a trusted friend from back in 2013-2014) and instead installed DBeaver. Everything worked out of the box. For docker, I used:
docker run -p 3306:3306 --name mysql1 -e MYSQL_ROOT_PASSWORD=secret -d mysql:latest --default-authentication-plugin=mysql_native_password
You can quickly peek at the mysql databases using:
docker exec -it mysql1 bash
mysql -u root -p
show databases;
MySQLWorkbench 8.0.11 for macOS addresses this. I can establish connection with root password protected mysql instance running in docker.
I solved this problem by installing MySQL 5.7:
First of all, You need to enable MySQL 5.7 community release yum repository on your system. The rpm packages for yum repository configuration are available on MySQL official website. Use on of below command as per your operating system version.
yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
yum localinstall https://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm
dnf install https://dev.mysql.com/get/mysql57-community-release-fc27-9.noarch.rpm
dnf install https://dev.mysql.com/get/mysql57-community-release-fc26-9.noarch.rpm
dnf install https://dev.mysql.com/get/mysql57-community-release-fc25-9.noarch.rpm
As you have successfully enabled MySQL yum repository on your system. Now, install MySQL 5.7 community server using following commands as per your operating system version.
yum install mysql-community-server
dnf install mysql-community-server
source: https://tecadmin.net/install-mysql-5-7-centos-rhel/