mariadb root user

This commit is contained in:
Bob Mottram 2017-06-05 21:34:20 +01:00
parent 45df6aad24
commit 6daa9664f1
1 changed files with 3 additions and 0 deletions

View File

@ -177,6 +177,9 @@ function install_mariadb {
systemctl daemon-reload
systemctl restart mariadb
run_query mysql "CREATE USER 'root@localhost' IDENTIFIED BY '${MARIADB_PASSWORD}'; flush privileges;"
run_query mysql "GRANT ALL PRIVILEGES ON * TO 'root@localhost'; flush privileges;"
mysqladmin -u root password "$MARIADB_PASSWORD"
mark_completed $FUNCNAME
}