Documentation Home
MySQL 5.5 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 27.1Mb
PDF (A4) - 27.2Mb
PDF (RPM) - 26.0Mb
HTML Download (TGZ) - 6.5Mb
HTML Download (Zip) - 6.5Mb
HTML Download (RPM) - 5.6Mb
Man Pages (TGZ) - 152.8Kb
Man Pages (Zip) - 254.9Kb
Info (Gzip) - 2.6Mb
Info (Zip) - 2.6Mb
Excerpts from this Manual

MySQL 5.5 Reference Manual  /  ...  /  Connecting Using the IPv6 Local Host Address 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 option to permit it to accept IPv6 connections. For example, put the following lines in your server option file and restart the server:

    bind-address = ::

    Alternatively, you can bind the server to ::1, but that makes the server more restrictive for TCP/IP connections. It accepts only IPv6 connections for that single address and rejects IPv4 connections. For more information, see Section, “Configuring the MySQL Server to Permit IPv6 Connections”.

  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:

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

    For the permitted syntax of IPv6 addresses in account names, see Section 6.2.3, “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:

    mysql> STATUS
    Connection:   ::1 via TCP/IP
    | CURRENT_USER() |
    | ipv6user@::1   |

User Comments
Sign Up Login You must be logged in to post a comment.