From d430acf7682a34d7a9db649c7c8bc6c7336a928b Mon Sep 17 00:00:00 2001
From: Dane Everitt <dane@daneeveritt.com>
Date: Sat, 3 Aug 2019 14:57:01 -0700
Subject: [PATCH] LOCK TABLES not LOCK

---
 CHANGELOG.md                                     | 2 +-
 app/Repositories/Eloquent/DatabaseRepository.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index a72fa998..22858333 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,7 +23,7 @@ error encountered during creation or update.
 return different groupings of servers. The default value is `subuser-of` which will include all of the user's servers
 that they are the owner of, as well as all servers they're a subuser of.
 * Added back ability to toggle OOM killer status on a per-server basis.
-* Added `LOCK` permission for generated database users.
+* Added `LOCK TABLES` permission for generated database users.
 
 ### Changed
 * Updated Paper egg to not download `server.properties` each time. [parkervcp/eggs#260](https://github.com/parkervcp/eggs/issues/260)
diff --git a/app/Repositories/Eloquent/DatabaseRepository.php b/app/Repositories/Eloquent/DatabaseRepository.php
index ffc8a284..9f78efb7 100644
--- a/app/Repositories/Eloquent/DatabaseRepository.php
+++ b/app/Repositories/Eloquent/DatabaseRepository.php
@@ -153,7 +153,7 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
     public function assignUserToDatabase(string $database, string $username, string $remote): bool
     {
         return $this->run(sprintf(
-            'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, LOCK, EXECUTE ON `%s`.* TO `%s`@`%s`',
+            'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, LOCK TABLES, EXECUTE ON `%s`.* TO `%s`@`%s`',
             $database,
             $username,
             $remote