From c33ea163b2df698fadc7775a4a935b76717df87c Mon Sep 17 00:00:00 2001 From: betanummeric <40263343+betanummeric@users.noreply.github.com> Date: Thu, 18 May 2023 09:28:34 +0200 Subject: [PATCH] fix connection arguments mysql driver compatability (#551) * only use the "database" connection argument with driver versions where "db" is deprecated/removed * connection arguments: fix KeyError * connection arguments: fix KeyError * connection arguments: use 'passwd' instead of 'password' with older drivers * add changelog fragment * refactoring: use "get_connector_name" in "mysql_connect" --------- Co-authored-by: Felix Hamme --- .../551-fix_connection_arguments_driver_compatability.yaml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/551-fix_connection_arguments_driver_compatability.yaml diff --git a/changelogs/fragments/551-fix_connection_arguments_driver_compatability.yaml b/changelogs/fragments/551-fix_connection_arguments_driver_compatability.yaml new file mode 100644 index 0000000..be18f56 --- /dev/null +++ b/changelogs/fragments/551-fix_connection_arguments_driver_compatability.yaml @@ -0,0 +1,2 @@ +bugfixes: + - mysql module utils - use the connection arguments ``db`` instead of ``database`` and ``passwd`` instead of ``password`` when running with older mysql drivers (MySQLdb < 2.1.0 or PyMySQL < 1.0.0) (https://github.com/ansible-collections/community.mysql/pull/551).