1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[エラー]docker-compose: mysqlとSequel Proの接続時に, 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/lib/plugin/caching_sha2_password.so, 2): image not foundが起きた

Posted at

何をしようとしたか

docker-composeを使って、local環境にmysqlを立ち上げて、Sequel Proを接続する

docker-compose: 3.3
mysql: 8.0.20

何が起きたか

docker-composeでmysqlを立ち上げた後に、クライアントからSequel Proでmysqlに接続する。
Screen Shot 2020-06-07 at 4.53.18.png

接続の際に以下のエラーが表示された。

Screen Shot 2020-06-07 at 1.54.29.png

何をしたか

docker-composeにcommand: --default-authentication-plugin=mysql_native_passwordを追加

docker-compose.yaml
# mysqlをdockerで立ち上げる
# command: sequel proの場合ログイン認証がデフォルトに対応していないための変更処置
version: "3.3"
services: 
    mysql:
        container_name: mysql-container
        hostname: mysql-server
        image: mysql         
        environment:
            MYSQL_DATABASE: "local"
            MYSQL_ROOT_PASSWORD: "root"
            MYSQL_USER: "user"
            MYSQL_PASSWORD: "user"
            MYSQL_ALLOW_EMPTY_PASSWORD: "true"
        ports: 
            - "4306:3306"            
        command: --default-authentication-plugin=mysql_native_password 

参考文献

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?