root@OrangePi:~# docker exec -it web_mysql_1 mysql -P 3306 -h localhost -uroot -pSECRET -e "set @var = '1'; select @var ;"
>
>
> to nothing
>
>
>
root@OrangePi:~# docker exec -it web_mysql_1 mysql -uroot -pSECRET -e "query"
>
> nothing
>
>
docker exec -it web_mysql_1 mysql -uroot -p
то он спрашивает пароль и после ввода открывается консоль и все работает. root@OrangePi:~# docker exec -it web_mysql_1 mysql -uroot -pSECRET
> help
> some
>
root@OrangePi:~# docker exec -it web_mysql_1 mysql -uroot -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 6272
Server version: 10.4.11-MariaDB-1:10.4.11+maria~bionic mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
root@OrangePi:~# docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4aa203b3e9c4 web_ddns "docker-entrypoint.s…" 4 weeks ago Up 12 days web_ddns_1
800b7d624914 nginx:latest "nginx -g 'daemon of…" 4 weeks ago Up 4 days 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp web_nginx_1
cdebc683a127 mhzawadi/phpmyadmin:latest-arm64v8 "/docker-entrypoint.…" 4 weeks ago Up 4 weeks 80/tcp web_phpmyadmin_1
96403bc827ac web_fpm "docker-php-entrypoi…" 4 weeks ago Up 4 weeks 9000/tcp web_fpm_1
11ccfb5364fe mariadb "docker-entrypoint.s…" 4 weeks ago Up 4 weeks 0.0.0.0:3306->3306/tcp web_mysql_1