Disable hostname resolution

MySQL automatically attempts to resolve hostnames to IP addresses,
mapping to ACL entries for users; this adds overhead for each
connection, and when DNS is wonky in some way can cause access
issues.

Use 'skip-name-resolve' to ensure that only IP addresses are
used with checking ACL's.

Change-Id: Idf55ddc3090da97a96dd0bbc30fc845f65d1692c
Partial-Bug: 1599222
This commit is contained in:
James Page 2017-01-25 09:25:23 +00:00
parent e47c4ad135
commit ae533965d6
2 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,10 @@
# Juju managed file - don't change as charm will overwrite your changed!
[mysqld]
# Never resolve IP's to hostnames; it adds overhead
# and is not really reliable for use with ACL's.
skip-name-resolve
{% if bind_address %}
bind-address = {{ bind_address }}
{% endif %}

View File

@ -12,6 +12,10 @@ tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
# Never resolve IP's to hostnames; it adds overhead
# and is not really reliable for use with ACL's.
skip-name-resolve
#
# * Networking
#