1

I run the mysql docker image with this command:

docker run --name mysql-docker -p 3306:3306 -e MYSQL_ROOT_PASSWORD=mysql_root -d mysql:8.0.12

The container is running. When I try to connect to it with MySQL Workbench from my local machine I get

Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

The documentation on the dockerhub page don't say anything about connecting from localhost, so I'm using 127.0.0.1 as the Hostname in MySQL Workbench.

How do I connect to MySQL running in a docker container from my local machine?

Dean Schulze
  • 9,633
  • 24
  • 100
  • 165
  • Possible duplicate of [Authentication plugin 'caching\_sha2\_password' cannot be loaded](https://stackoverflow.com/questions/49194719/authentication-plugin-caching-sha2-password-cannot-be-loaded) – lvthillo Sep 03 '18 at 20:36
  • That link contained the work-around for this problem. I ran into several other problems with MySQL just setting up a user and creating the first schema. I can't believe that there are so many errors in a mature database. Dropping MySQL and using Postgresql. – Dean Schulze Sep 04 '18 at 03:00

0 Answers0