This is a spin-off from
MDEV-4379. Quoting from there
If a mariadb is configured to bind to a hostname, it should be possible for it to bind to both the ipv4 and ipv6 addresses defined for that hostname if the host is set up that way. This is the standard behavior with server software (openldap, postfix, apache, etc). Most also include options to force binding only to a specific ip protocol if desired. This is helpful for dual stack systems where it may be desired to have a server bind to both the ipv4 and ipv6 addresses for serving clients.