James Linden

~# linux devops jedi / maker / N6NRD

Code / MySQL Database/User Quick Deploy

MySQL Database/User Quick Deploy


The MySQL Database/User Quick Deploy is a simple BASH script to create a new database and user easily.


  • Linux
  • BASH
  • MySQL or MariaDB


  • This script is designed to run on the command line.
  • This script grants user access to '%' host. Modify the script to secure for your local environment.


Download mysqlquickdeploy.sh.


name required description
database yes The name you want to use for your new database
user yes Username to create and give access to the database
password yes Password to give the new user
import_file no If supplied, and the file exists, import import_file into the new database

If the specified database or username already exist, the script will warn and exit.



mysqlquickdeploy putdatahere theuser secretpass

With SQL file import

mysqlquickdeploy putdatahere theuser secretpass data.sql


This project is BSD (2 clause) licensed.

photo of James Linden
Founder / Head Geek
Digital Dock, LLC
aka kodekrash & N6NRD
Collegeville, PA USA

What I Do

Linux DevOps
Web development

Full CV

What I've Done

Drowned a motorcycle
Rescued a skunk
Built Prime GNU/Linux
Contributed to Spidering Hacks