diff --git a/scripts/firstrun_maria b/scripts/firstrun_maria index 99202621020f8b86338f108a133c23e154cc87f9..7345bf6556e21a588c9dd9636927529cbfa70943 100755 --- a/scripts/firstrun_maria +++ b/scripts/firstrun_maria @@ -55,6 +55,14 @@ firstrun_maria() { echo "Disabled" fi + + # 1. Create localhost db user DB_USER with root privilieges + # 2. Create remote db user DB_USER with root privilieges + mysql -uroot -e "CREATE USER '${DB_USER}'@'localhost' IDENTIFIED BY '${DB_PASS}'; GRANT ALL PRIVILEGES ON *.* TO '${DB_USER}'@'localhost' WITH GRANT OPTION;" + mysql -uroot -e "CREATE USER '${DB_USER}'@'%' IDENTIFIED BY '${DB_PASS}'; GRANT ALL PRIVILEGES ON *.* TO '${DB_USER}'@'%' WITH GRANT OPTION;" + + + # shutdown mariadb to wait for supervisor mysqladmin -u root shutdown