42

On a freshly installed (windows version of) MySQL 5.5.9

SELECT user, host FROM mysql.user

gives:

user            host    

root        localhost   
root        127.0.0.1    
root        ::1  
localhost    

But what IP/hostname does ::1 stand here for?

1 Answer 1

65

::1 is the IPv6 address for localhost.

The details (incl.those relevant to the Windows case) are at http://dev.mysql.com/doc/refman/5.5/en/default-privileges.html.

8
  • 1
    It has nothing to do with what MySQL uses; it has to do with what your system uses. The datatype of the host column is varchar; you could put just about anything in there... Commented Feb 22, 2011 at 17:21
  • 9
    More specifically, the IPv6 address for localhost is 0000:0000:0000:0000:0000:0000:0000:0001, but all those zeros can be abbreviated, shortening the address down to ::1. Commented Feb 22, 2011 at 17:25
  • @Brian Driscoll So, even if IPv6 is not installed in the system, the address will probably be still there? Seems interesting, esp. if one remembers MySQL's "pre-cooking" of some values in the host column (dev.mysql.com/doc/refman/5.0/en/account-names.html).
    – mlvljr
    Commented Feb 22, 2011 at 17:42
  • oops! Found it myself: dev.mysql.com/doc/refman/5.5/en/default-privileges.html.
    – mlvljr
    Commented Feb 22, 2011 at 17:56
  • 1
    @mlvljr Thanks for your time, Do drop in a link someday if you recall. Commented May 21, 2013 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.