Rechercher dans le manuel MySQL

5.1.12.3 Connecting Using the IPv6 Local Host Address

The following procedure shows how to configure MySQL to permit IPv6 connections by clients that connect to the local server using the ::1 local host address. The instructions given here assume that your system supports IPv6.

  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 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 will connect from the ::1 local IPv6 host address:

    1. 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.

  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:

    1. mysql> STATUS
    2. ...
    3. Connection:   ::1 via TCP/IP
    4. ...
    5.  
    6. mysql> SELECT CURRENT_USER(), @@bind_address;
    7. +----------------+----------------+
    8. | CURRENT_USER() | @@bind_address |
    9. +----------------+----------------+
    10. | ipv6user@::1   | ::             |
    11. +----------------+----------------+

Find a PHP function

Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-ipv6-local-connections.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:en Manuel MySQL : https://dev.mysql.com/

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut