In my case I was trying to pass a shell command to a container. In which case only the first word was interpreted. Ensure that you're not running:
mysql
as opposed to:
mysql -uroot -ppassword schemaname
perhaps try quoting:
'mysql -uroot -ppassword schemaname'