This is part of a Bash script, and the inside looks like this:
createdbcmd="docker exec $1 mysql -v -uroot -e \"GRANT ALL PRIVILEGES ON $dbname.* TO $2@$4 IDENTIFIED BY '$3'\""
echo $createdbcmd
$createdbcmd
the echo looks like this:
docker exec mysql_test_no mysql -v -uroot -e "GRANT ALL PRIVILEGES ON wordpress.* TO [email protected] IDENTIFIED BY 'changeme'"
Running this exact command works just fine. via the bash-script it acts as if i'm just running 'mysql' and i get the default help information with no error.