content_image/780903.jpg
can do this as of MySQL 8.0.13 by specifying a comma-separated list of values for bind_address . This example specifies the local host addresses for both IPv4 and IPv6: 

[mysqld] bind_address = 127.0.0.1,::1 

For more information, see the bind_address  description in Section 5.1.8, “Server System Variables” . 

2. As an administrator, connect to the server and create an account for a local user who can connect from the ::1  local IPv6 host address: 

mysql> CREATE USER ’ipv6user’@’::1’ IDENTIFIED BY ’ipv6pass’; 

For the permitted syntax of IPv6 addresses in account names, see Section 6.2.4, “Specifying Account Names” . In addition to the CREATE USER  statement, you can issue GRANT  statements that give specific privileges to the account, although that is not necessary for the remaining steps in this procedure. 

## 5.1.13.4 Connecting Using IPv6 Nonlocal Host Addresses 

3. Invoke the mysql  client to connect to the server using the new account: 

shell> mysql -h ::1 -u ipv6user -pipv6pass 

4. Try some simple statements that show connection information: 

mysql> STATUS ... Connection: ::1 via TCP/IP ... mysql> SELECT CURRENT_USER(), @@bind_address; 

<img src='content_image/780903.jpg'>

The following procedure shows how to configure MySQL to permit IPv6 connections by remote clients. It is similar to the preceding procedure for local clients, but the server and client hosts are distinct and each has its own nonlocal IPv6 address. The example uses these addresses: 

Server host: 2001:db8:0:f101::1 Client host: 2001:db8:0:f101::2 

These addresses are chosen from the nonroutable address range recommended by IANA for documentation purposes and suffice for testing on your local network. To accept IPv6 connections from clients outside the local network, the server host must have a public address. If your network provider assigns you an IPv6 address, you can use that. Otherwise, another way to obtain an address is to use an IPv6 broker; see Section 5.1.13.5, “Obtaining an IPv6 Address from a Broker” . 

1. Start the MySQL server with an appropriate bind_address  setting to permit it to accept IPv6 connections. For example, put the following lines in the server option file and restart the server: 

[mysqld] bind_address = * 

Specifying * (or :: ) as the value for bind_address  permits both IPv4 and IPv6 connections on all server host IPv4 and IPv6 interfaces. If you want to bind the server to a specific list of addresses, you can do this as of MySQL 8.0.13 by specifying a comma-separated list of values for bind_address . This example specifies an IPv4 address as well as the required server host IPv6 address: 

