diff --git a/hsarback/src/de/hsadmin/mods/db/MySqlDatabaseProcessorFactory.java b/hsarback/src/de/hsadmin/mods/db/MySqlDatabaseProcessorFactory.java index df1741b..ea91ea0 100644 --- a/hsarback/src/de/hsadmin/mods/db/MySqlDatabaseProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/db/MySqlDatabaseProcessorFactory.java @@ -56,6 +56,7 @@ public class MySqlDatabaseProcessorFactory implements EntityProcessorFactory { String aName = AbstractEntity.escapeString(db.getName()); String aOwner = AbstractEntity.escapeString(db.getOwner()); aJDBCP.addSQL("REVOKE ALL ON " + aName + ".* FROM '" + aOwner + "'@'%'"); + aJDBCP.addSQL("CALL mysql.kill_by_database('" + aName + "');"); aJDBCP.addSQL("DROP DATABASE IF EXISTS " + aName); return aJDBCP; } diff --git a/hsarback/src/de/hsadmin/mods/db/MySqlUserProcessorFactory.java b/hsarback/src/de/hsadmin/mods/db/MySqlUserProcessorFactory.java index f8841c8..199f675 100644 --- a/hsarback/src/de/hsadmin/mods/db/MySqlUserProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/db/MySqlUserProcessorFactory.java @@ -41,6 +41,7 @@ public class MySqlUserProcessorFactory implements EntityProcessorFactory { JDBCProcessor aJDBCP = MySqlDatabaseProcessorFactory.createMySqlAdminProcessor(); String aName = AbstractEntity.escapeString(dbu.getName()); aJDBCP.addSQL("REVOKE ALL PRIVILEGES, GRANT OPTION FROM '" + aName + "'@'%'"); + aJDBCP.addSQL("CALL mysql.kill_by_user('" + aName + "');"); aJDBCP.addSQL("DROP USER '" + aName + "'@'%'"); return aJDBCP; }