Shell script to create MySQL database and user

Simple script to create MySQL database and user really quickly.

It takes three parameters:

  1. db name
  2. db username
  3. password

Usage:

  • Name it something like mysql-db-create.sh
  • Make it executable $ sudo chmod 755 mysql-db-create.sh
  • Run it sudo ./mysql-db-create.sh dbname dbuser password

Source.

Comments

Club-Mate, the beverage → club-mate.fi