From 11e580f8c05dd4a00ccfa5d1d981376c5da6fe50 Mon Sep 17 00:00:00 2001 From: Ulrich Block Date: Sat, 5 Oct 2013 18:46:01 +0200 Subject: [PATCH] 99: delete still not working properly https://github.com/easy-wi/developer/issues/99 --- web/stuff/mysql_functions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/stuff/mysql_functions.php b/web/stuff/mysql_functions.php index 38b8a98c..573f53d6 100644 --- a/web/stuff/mysql_functions.php +++ b/web/stuff/mysql_functions.php @@ -180,6 +180,9 @@ class ExternalSQL { $query = $this->remotesql->prepare("DROP USER ?@''"); $query->execute(array($dbname)); + $query = $this->remotesql->prepare("DROP USER ?@'localhost'"); + $query->execute(array($dbname)); + $this->remotesql->exec("FLUSH PRIVILEGES; FLUSH HOSTS;"); } catch (PDOException $error) { @@ -200,6 +203,9 @@ class ExternalSQL { $query = $this->remotesql->prepare("DROP USER ?@''"); $query->execute(array($username)); + $query = $this->remotesql->prepare("DROP USER ?@'localhost'"); + $query->execute(array($username)); + $this->remotesql->exec("FLUSH PRIVILEGES; FLUSH HOSTS;"); } catch (PDOException $error) {