Authentication plugin 'caching_sha2_password' cannot be loaded

前端 未结 30 2736
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 05:19

I am connecting MySQL - 8.0 with MySQL Workbench and getting the below error:

Authentication plugin \'caching_sha2_password\' cannot be loaded: dlop

30条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 05:58

    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;
    

提交回复
热议问题