serg, results of the functionality check are below.
However, I'm not sure the functionality described at http://dev.mysql.com/doc/refman/5.6/en/ipv6-server-config.html is quite the same as the reporter initially requested.
To my understanding, the request is that if we run the server with bind-address=hostname, and we have both IPv4 and IPv6 in the host configuration for this hostname, the server should accept both IPv4 and IPv6 connections (but only those that relate to this hostname). It does not seem to be happening now; instead, upon server startup, the hostname is resolved to something, either IPv4 or IPv6, and further it works as if we provided the corresponding address upon startup.
Regarding documentation, I haven't found anything about IPv6 support in MariaDB KB, so Arjen's comment is pretty accurate in this part.
My /etc/hosts
127.0.0.1 localhost
|
127.0.1.1 saucy64
|
::1 saucy64
|
10.0.2.15 saucy64
|
|
# The following lines are desirable for IPv6 capable hosts
|
::1 ip6-localhost ip6-loopback
|
fe00::0 ip6-localnet
|
ff00::0 ip6-mcastprefix
|
ff02::1 ip6-allnodes
|
ff02::2 ip6-allrouters
|
I've checked the following combinations:
servers: mysql-5.5.37, mysql-5.6.17, mariadb-5.5.37, mariadb-10.0.10
|
ipv6.disable: 0, 1
|
bind-address: default, *, 0.0.0.0, ::, ::1, ::ffff:127.0.0.1, 10.0.2.15, 127.0.0.1, saucy64
|
host value in client params: localhost, 127.0.0.1, 10.0.2.15, saucy64, ::1, ::ffff:127.0.0.1
|
User configuration:
+--------+-----------+
|
| user | host |
|
+--------+-----------+
|
| elenst | 10.0.2.15 |
|
| elenst | 127.0.0.1 |
|
| elenst | ::1 |
|
| elenst | localhost |
|
| elenst | saucy64 |
|
+--------+-----------+
|
Results:
Between MySQL 5.6 and MariaDB 10.0, there is a piece of functionality apparently not merged into 10.0.
MySQL 5.6 has a special value '*' for bind-address:
If the address is *, the server accepts TCP/IP connections on all server host IPv6 and IPv4 interfaces if the server host supports IPv6, or accepts TCP/IP connections on all IPv4 addresses otherwise. Use this address to permit both IPv4 and IPv6 connections on all server interfaces.
Thus, this special value only makes sense if we want a universal configuration which would allow all possible connections, and which would work both on IPv6-enabled and IPv6-disabled machines.
There is no such possibility in MariaDB 10.0 now. The closest one is '::', but if it's set on an IPv6-disabled host, the server won't start.
In MySQL/MariaDB 5.5 and MariaDB 10.0, '*' works identically to 0.0.0.0 – that is, it doesn't allow IPv6 connections.
–
Between MySQL 5.5 and MariaDB 5.5/10.0, I haven't found any functionality that would not be merged from MySQL to MariaDB, but name resolving works differently and thus causes different results:
In some cases, where MySQL 5.5 resolves the connecting user to elenst@saucy64, MariaDB resolves it to elenst@10.0.2.15.
The difference is not observed with MySQL 5.6
Also, the following is true for MySQL (both 5.5 and 5.6) vs MariaDB (both 5.5 and 10.0):
If bind address is a host name, and the host configuration offers different variants for resolving it, MySQL intentionally prefers ipv4 over ipv6 (there is a comment about it in the code). MariaDB doesn't do it. As a result, the following combination works differently on MySQL and MariaDB:
ipv6: enabled
bind-address: saucy64
MariaDB allows to connect with --host=::1, but not 127.0.1.1
MySQL allows to connect with --host=127.0.1.1, but not ::1
Stock MySQL 5.5 and above has a mechanism for this.
http://dev.mysql.com/doc/refman/5.5/en/ipv6-server-config.html
It appears MariaDB 10.0.9 does all or most of that, but I'm not certain it's all documented.
It's just quietly there