I am writing a shell script that to setup my server and I need to create a database as part of this process. Its pretty easy to do. You can create a database from the command line without logging in to mysql interactive mode. Here is the code
>mysql -u root -pyourpassword -e “create database some_database_name;”
NOTE: when I pasted this into bash, I had to change the quotes.. I guess wordpress converts them to a different encoding