Authentication plugin 'caching_sha2_password' cannot be loaded

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

    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 |
    +---+
    

提交回复
热议问题