Authentication plugin 'caching_sha2_password' cannot be loaded

前端 未结 30 2846
爱一瞬间的悲伤
爱一瞬间的悲伤 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:56

    For Windows 10,

    1. Modify my.ini file in C:\ProgramData\MySQL\MySQL Server 8.0\

      [mysqld]
      default_authentication_plugin=mysql_native_password
      
    2. Restart the MySQL Service.

    3. 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';
        
    4. Open MySQL workbench, and open a new connection using the new user credentials.

    I was facing the same issue and this worked.

    0 讨论(0)
  • 2020-11-22 05:56

    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.

    0 讨论(0)
  • 2020-11-22 05:56

    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

    0 讨论(0)
  • 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;
    
    0 讨论(0)
  • 2020-11-22 05:58

    MySQLWorkbench 8.0.11 for macOS addresses this. I can establish connection with root password protected mysql instance running in docker.

    0 讨论(0)
  • 2020-11-22 05:58

    I solved this problem by installing MySQL 5.7:

    Step 1 – Enable MySQL Repository

    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.

    On CentOS and RHEL 7

    yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
    

    On CentOS and RHEL 6

    yum localinstall https://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm
    

    On Fedora 27

    dnf install https://dev.mysql.com/get/mysql57-community-release-fc27-9.noarch.rpm
    

    On Fedora 26

    dnf install https://dev.mysql.com/get/mysql57-community-release-fc26-9.noarch.rpm
    

    On Fedora 25

    dnf install https://dev.mysql.com/get/mysql57-community-release-fc25-9.noarch.rpm
    

    Step 2 – Install MySQL 5.7 Server

    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.

    On CentOS and RHEL 7/6

    yum install mysql-community-server
    

    On Fedora 27/26/25

     dnf install mysql-community-server
    

    source: https://tecadmin.net/install-mysql-5-7-centos-rhel/

    0 讨论(0)
提交回复
热议问题