diff --git a/AUTHORS b/AUTHORS index a8bfe07f6b0..9ea3cd1b569 100644 --- a/AUTHORS +++ b/AUTHORS @@ -464,6 +464,7 @@ answer newbie questions, and generally made Django that much better: Marcin Wróbel Marc Remolt Marc Tamlyn + Marc-Aurèle Brothier Marian Andre Marijn Vriens Mario Gonzalez diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index 524e90d6eb7..94415139cc3 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -369,8 +369,9 @@ class DatabaseWrapper(BaseDatabaseWrapper): @cached_property def mysql_version(self): - with self.temporary_connection(): - server_info = self.connection.get_server_info() + with self.temporary_connection() as cursor: + cursor.execute('SELECT VERSION()') + server_info = cursor.fetchone()[0] match = server_version_re.match(server_info) if not match: raise Exception('Unable to determine MySQL version from version string %r' % server_info)