Skip to content

Instantly share code, notes, and snippets.

View benjamin-dk's full-sized avatar

Benjamin Christensen benjamin-dk

  • Aarhus Universitetshospital
View GitHub Profile
@benjamin-dk
benjamin-dk / create_database.sh
Last active December 18, 2015 01:29
Linux bash script for setting up a new database and database user in MySQL
#!/bin/bash
# Command should follow this pattern: ./createdb testdb testuser secretpass
BTICK='`'
EXPECTED_ARGS=3
E_BADARGS=65
MYSQL=`which mysql`
echo "You will be prompted your mysql root password."