I am connecting MySQL - 8.0 with MySQL Workbench and getting the below error:
Authentication plugin \'caching_sha2_password\' cannot be loaded: dlop
Downloading a development release of 8.0.11-rc worked for me on a mac. with the following docker commands:
docker run --name mysql -p 3406:3306 -e MYSQL_ROOT_PASSWORD=mypassword -d mysql
you can change the encryption of the password like this.
ALTER USER 'yourusername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword';
I had the same problem, but the answer by Aman Aggarwal didn't work for me with a Docker container running mysql 8.X. I loged in the container
docker exec -it CONTAINER_ID bash
then log into mysql as root
mysql --user=root --password
Enter the password for root (Default is 'root') Finally Run:
ALTER USER 'username' IDENTIFIED WITH mysql_native_password BY 'password';
You're all set.
This is my databdase definition in my docker-compose:
dataBase:
image: mysql:8.0
volumes:
- db_data:/var/lib/mysql
networks:
z-net:
ipv4_address: 172.26.0.2
restart: always
entrypoint: ['docker-entrypoint.sh', '--default-authentication-plugin=mysql_native_password']
environment:
MYSQL_ROOT_PASSWORD: supersecret
MYSQL_DATABASE: zdb
MYSQL_USER: zuser
MYSQL_PASSWORD: zpass
ports:
- "3333:3306"
The relevant line there is entrypoint.
After build and up it, you can test it with:
$ mysql -u zuser -pzpass --host=172.26.0.2 zdb -e "select 1;"
Warning: Using a password on the command line interface can be insecure.
+---+
| 1 |
+---+
| 1 |
+---+
Currently (on 2018/04/23), you need to download a development release. The GA ones do not work.
I was not able to connect with the latest GA version (6.3.10).
It worked with mysql-workbench-community-8.0.11-rc-winx64.msi
(from https://dev.mysql.com/downloads/workbench/, tab Development Releases).
like this?
docker run -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -d mysql --default-authentication-plugin=mysql_native_password
mysql -uroot --protocol tcp
Try in PWD
https://github.com/GitHub30/docs/blob/change-default_authentication_plugin/mysql/stack.yml
or You shoud use MySQL Workbench 8.0.11.