Explorar el Código

mariadb root user

Bob Mottram hace 7 años
padre
commit
6daa9664f1
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3
    0
      src/freedombone-utils-database

+ 3
- 0
src/freedombone-utils-database Ver fichero

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