Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I found this in my local MySQL installation today:

mysql> select host, user from user;
| host         | user    |
| ::1          | root    |
| ... others...| etc.    |

What is the host ::1? Should I delete it? I only need to log in from localhost.

share|improve this question
up vote 8 down vote accepted

::1 Localhost is the equivalent to Localhost but using IPv6 protocol format

to clarify further:

:: is an abbreviation for zeros, so this entry really means

0000:0000:0000:0000:0000:0000:0000:0001 localhost
share|improve this answer

That is the IPV6 representation of

I wrote an earlier post on this.

MySQL 5.5 started embedding this upon initial installation. It's OK to leave it if you assign 'root'@'::1' a password. If you do not want it to have a password, then you can drop that user.

@Jakub mentioned the direct answer first, so he gets a +1 from me !!!

If you want to remove it, you could run either

DROP USER 'root'@'::1';


DELETE FROM mysql.user WHERE user='root' AND host='::1';

If you are using only root@localhost and want to eliminate all other root users, do this:

DELETE FROM mysql.user WHERE user='root' AND host<>'localhost';
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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