From c9a34ae33e13b189c589063a0aff923e444c96c6 Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Thu, 30 Jan 2020 19:44:47 +0300 Subject: [PATCH] mysql modules: fix the module's documentation (#66848) --- lib/ansible/plugins/doc_fragments/mysql.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/ansible/plugins/doc_fragments/mysql.py b/lib/ansible/plugins/doc_fragments/mysql.py index 56ac8f404e1..9c204cb276d 100644 --- a/lib/ansible/plugins/doc_fragments/mysql.py +++ b/lib/ansible/plugins/doc_fragments/mysql.py @@ -20,6 +20,8 @@ options: login_host: description: - Host running the database. + - In some cases for local connections the I(login_unix_socket=/path/to/mysqld/socket), + that is usually C(/var/run/mysqld/mysqld.sock), needs to be used instead of I(login_host=localhost). type: str default: localhost login_port: @@ -74,4 +76,9 @@ notes: passing credentials. If none are present, the module will attempt to read the credentials from C(~/.my.cnf), and finally fall back to using the MySQL default login of 'root' with no password. + - If there are problems with local connections, using I(login_unix_socket=/path/to/mysqld/socket) + instead of I(login_host=localhost) might help. As an example, the default MariaDB installation of version 10.4 + and later uses the unix_socket authentication plugin by default that + without using I(login_unix_socket=/var/run/mysqld/mysqld.sock) (the default path) + causes the error ``Host '127.0.0.1' is not allowed to connect to this MariaDB server``. '''