This script will create SQL commands to create a user and a database.
./create_user_with_database.sh -u your_user_name -p your_very_log_password | mysql
Use a .my.cnf in you home directory with database privileges to surpress credential information.