Skip to content

Instantly share code, notes, and snippets.

@madalinignisca
Created March 8, 2018 12:38
Show Gist options
  • Save madalinignisca/7666aaa10dabcbccd839dfa707fbf1e6 to your computer and use it in GitHub Desktop.
Save madalinignisca/7666aaa10dabcbccd839dfa707fbf1e6 to your computer and use it in GitHub Desktop.
Shell script to create a database
if [ $# -eq 0 ]
then
echo "No arguments supplied"
else
mysql -uroot --execute="CREATE DATABASE $1 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment