Skip to content

Instantly share code, notes, and snippets.

@rajeshisnepali
Created February 6, 2019 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajeshisnepali/198a29046699eb4ed0c39a3b9818f5fd to your computer and use it in GitHub Desktop.
Save rajeshisnepali/198a29046699eb4ed0c39a3b9818f5fd to your computer and use it in GitHub Desktop.
create database (mysql or maria db)
#!/bin/bash
#format
# create-db.sh '`test-1234`'
mysql -u root -p <<MYSQL_SCRIPT
CREATE DATABASE $1 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
MYSQL_SCRIPT
echo Mysql Database $1 created
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment