Authentication plugin 'caching_sha2_password' cannot be loaded

前端 未结 30 3347
爱一瞬间的悲伤
爱一瞬间的悲伤 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条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 06:05

    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:

    1. sudo apt-get update
    2. sudo apt-get install lsb-release -y
    3. Download a Debian package which update apt sources for you from the MySQL web site.
    4. 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.
    5. sudo apt-get update
    6. sudo apt-get install mysql-client -y
    7. Done. You can now run the new MySQL client and connect with the new authentication method.

提交回复
热议问题