more robust;
authorwenzelm
Wed, 11 Dec 2019 22:09:34 +0100
changeset 71274 5212ca49598a
parent 71273 6b8cbdc9713b
child 71275 18f4061fd817
more robust;
src/Pure/Tools/phabricator.scala
--- a/src/Pure/Tools/phabricator.scala	Wed Dec 11 21:49:24 2019 +0100
+++ b/src/Pure/Tools/phabricator.scala	Wed Dec 11 22:09:34 2019 +0100
@@ -311,7 +311,8 @@
     Isabelle_System.bash("mysql --user=" + Bash.string(mysql_root_user) +
       " --password=" + Bash.string(mysql_root_password) + " --execute=" +
       Bash.string(
-        """CREATE USER IF NOT EXISTS """ + mysql_user_string +
+        """DROP USER IF EXISTS """ + mysql_user_string + "; " +
+        """CREATE USER """ + mysql_user_string +
         """ IDENTIFIED BY """ + SQL.string(mysql_password) + """ PASSWORD EXPIRE NEVER; """ +
         """GRANT ALL ON `""" + (mysql_name + "_%").replace("_", "\\_") +
         """`.* TO """ + mysql_user_string + ";")).check