Я запускаю mysql с файлом compose:
version: "3"
services:
my-sql:
image: mysql
container_name: my-sql
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: passw0rd
MYSQL_USER: dbuser
MYSQL_PASSWORD: pass1234
MYSQL_DATABASE: connect_test
При поиске IP-адреса контейнера следующим образом:
root@sevenos:~# docker inspect my-sql | grep IPAddress
"SecondaryIPAddresses": null,
"IPAddress": "",
"IPAddress": "172.18.0.2",
Когда я соединяюсь с my-sql client
вне контейнера,Я получаю ошибку следующим образом:
root@sevenos:~# mysql -uroot -ppassw0rd -h 172.18.0.2 -P 3306
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be
loaded: /usr/lib/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory