docker exec mattermost-mysql mysql -uroot -pmostest -e "CREATE DATABASE migrated; CREATE DATABASE latest; GRANT ALL PRIVILEGES ON migrated.* TO mmuser; GRANT ALL PRIVILEGES ON latest.* TO mmuser" echo ...
Packaging this as container makes it portable, this is really build once and run anywhere. now to start the container do this $docker run -it --env-file .envfile ...