mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-24 03:11:25 -07:00
Docs: add info how to cope with a protocol-related connection error using login_unix_socket argument (#420) (#431)
(cherry picked from commit f1d63e3fc8
)
This commit is contained in:
parent
108c4ae729
commit
c199000eee
7 changed files with 21 additions and 0 deletions
|
@ -183,10 +183,13 @@ extends_documentation_fragment:
|
|||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
# If you encounter the "Please explicitly state intended protocol" error,
|
||||
# use the login_unix_socket argument
|
||||
- name: Create a new database with name 'bobdata'
|
||||
community.mysql.mysql_db:
|
||||
name: bobdata
|
||||
state: present
|
||||
login_unix_socket: /run/mysqld/mysqld.sock
|
||||
|
||||
- name: Create new databases with names 'foo' and 'bar'
|
||||
community.mysql.mysql_db:
|
||||
|
|
|
@ -76,9 +76,12 @@ EXAMPLES = r'''
|
|||
# Display all info from databases group except settings:
|
||||
# ansible databases -m mysql_info -a 'filter=!settings'
|
||||
|
||||
# If you encounter the "Please explicitly state intended protocol" error,
|
||||
# use the login_unix_socket argument
|
||||
- name: Collect all possible information using passwordless root access
|
||||
community.mysql.mysql_info:
|
||||
login_user: root
|
||||
login_unix_socket: /run/mysqld/mysqld.sock
|
||||
|
||||
- name: Get MySQL version with non-default credentials
|
||||
community.mysql.mysql_info:
|
||||
|
|
|
@ -57,10 +57,13 @@ extends_documentation_fragment:
|
|||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
# If you encounter the "Please explicitly state intended protocol" error,
|
||||
# use the login_unix_socket argument
|
||||
- name: Simple select query to acme db
|
||||
community.mysql.mysql_query:
|
||||
login_db: acme
|
||||
query: SELECT * FROM orders
|
||||
login_unix_socket: /run/mysqld/mysqld.sock
|
||||
|
||||
- name: Select query to db acme with positional arguments
|
||||
community.mysql.mysql_query:
|
||||
|
|
|
@ -191,9 +191,12 @@ seealso:
|
|||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
# If you encounter the "Please explicitly state intended protocol" error,
|
||||
# use the login_unix_socket argument
|
||||
- name: Stop mysql replica thread
|
||||
community.mysql.mysql_replication:
|
||||
mode: stopreplica
|
||||
login_unix_socket: /run/mysqld/mysqld.sock
|
||||
|
||||
- name: Get master binlog file name and binlog position
|
||||
community.mysql.mysql_replication:
|
||||
|
|
|
@ -152,11 +152,14 @@ extends_documentation_fragment:
|
|||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
# If you encounter the "Please explicitly state intended protocol" error,
|
||||
# use the login_unix_socket argument
|
||||
- name: Removes anonymous user account for localhost
|
||||
community.mysql.mysql_user:
|
||||
name: ''
|
||||
host: localhost
|
||||
state: absent
|
||||
login_unix_socket: /run/mysqld/mysqld.sock
|
||||
|
||||
- name: Removes all anonymous user accounts
|
||||
community.mysql.mysql_user:
|
||||
|
|
|
@ -58,9 +58,12 @@ extends_documentation_fragment:
|
|||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
# If you encounter the "Please explicitly state intended protocol" error,
|
||||
# use the login_unix_socket argument
|
||||
- name: Check for sync_binlog setting
|
||||
community.mysql.mysql_variables:
|
||||
variable: sync_binlog
|
||||
login_unix_socket: /run/mysqld/mysqld.sock
|
||||
|
||||
- name: Set read_only variable to 1 persistently
|
||||
community.mysql.mysql_variables:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue