Monday, February 13, 2017

PowerShell - Create Users, Databases, and Set Permission on MySQL

SCENARIO

You want to automate the creation of lots of MySQL user accounts, databases, and permissions set on those user accounts.  You can do this through PowerShell.

I modified a script by berniecamus: https://github.com/berniecamus/create-mysql-database/blob/master/createmysql.ps1

Create a csv file with the following headings: