Ver código fonte

Fixed database user authentification on backup restore.
A special thanks to @joshbmarshall for pointing us on the right way.

Raphael Schneeberger 6 anos atrás
pai
commit
402530a3c6
2 arquivos alterados com 3 adições e 2 exclusões
  1. 1 0
      CHANGELOG.md
  2. 2 2
      func/rebuild.sh

+ 1 - 0
CHANGELOG.md

@@ -56,6 +56,7 @@ All notable changes to this project will be documented in this file.
 - Fixed formatting of backup exclusions textbox.
 - Fixed MultiPHP upgrade script to update all web templates.
 - Fixed report issue link in installer scripts.
+- Fixed database user authentification on backup restore.
 
 ## [1.0.6] - 2019-09-24 - Hotfix
 ### Bugfixes

+ 2 - 2
func/rebuild.sh

@@ -631,8 +631,8 @@ rebuild_mysql_database() {
             mysql_query "CREATE USER \`$DBUSER\`@localhost" > /dev/null
         else
             # mariadb = 10
-            mysql_query "CREATE USER IF NOT EXISTS \`$DBUSER\`" > /dev/null
-            mysql_query "CREATE USER IF NOT EXISTS \`$DBUSER\`@localhost" > /dev/null
+            mysql_query "CREATE USER IF NOT EXISTS \`$DBUSER\` IDENTIFIED BY PASSWORD '$MD5'" > /dev/null
+            mysql_query "CREATE USER IF NOT EXISTS \`$DBUSER\`@localhost IDENTIFIED BY PASSWORD '$MD5'" > /dev/null
         fi
         # mariadb any version
         query="UPDATE mysql.user SET Password='$MD5' WHERE User='$DBUSER'"