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.

2 Answers 2


::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

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';

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.