dotfiles/bin/mysql_add_user.sh
Tyrel Souza b19051d266
updates
2018-04-05 16:14:03 -04:00

13 lines
341 B
Bash
Executable File

#! /bin/bash
newUser='klaviyo'
newDbPassword='oyivalk'
newDb='test_klaviyo'
host=localhost
#host='%'
commands="CREATE DATABASE \`${newDb}\`;GRANT USAGE ON *.* TO '${newUser}'@'${host}' IDENTIFIED BY '${newDbPassword}';GRANT ALL privileges ON \`${newDb}\`.*
TO '${newUser}'@'${host}';FLUSH PRIVILEGES;"
echo "${commands}" | mysql -u root