I want to create a database on a remote server through ssh with a bash script. Something like this
#!/bin/sh
ssh user@example.com 'mysql -h example.com -uroot -pMYPASSWD -e "CREATE DATABASE $1;"'
So that I in terminal can run it like
$ myBashScript nameOfNewDatabase
The following script can remotely execute arbitrary commands