I'm trying to run mysql command into a docker container from a remote machine, through SSH. In particular the command is this one:
ssh user@servername /usr/bin/sudo /usr/bin/docker exec CONTAINER '/usr/bin/mysql --user=USER --password=PASSWORD -e "show databases;"'
I receive this response: ERROR 1049 (42000): Unknown database 'databases;"'
The same command (/usr/bin/sudo /usr/bin/docker exec CONTAINER /usr/bin/mysql --user=USER --password=PASSWORD -e "show databases;") launched on the machine where the container is running, works!
Someone could help me? thank you