I just did a SELECT Host, User, Password FROM mysql.user; and I get the following results :
+-------------------------------------+----------+-------------------------------------------+ | Host | User | Password | +-------------------------------------+----------+-------------------------------------------+ | localhost | root | *CFB0F01E12976D94C46201145940E3EF71E32742 | | my_name_goes_here-MacBook-Pro.local | root | *CFB0F01E12976D94C46201145940E3EF71E32742 | | 127.0.0.1 | root | *CFB0F01E12976D94C46201145940E3EF71E32742 | | ::1 | root | *CFB0F01E12976D94C46201145940E3EF71E32742 | | localhost | | | | my_name_goes_here-MacBook-Pro.local | | | | % | testuser | *00E247AC5F9AF26AE0194B41E1E769DEE1429A29 | +-------------------------------------+----------+-------------------------------------------+
How do I remove these duplicate entries?
(I can also see the previous version of mysql(5.5.8) in my hard drive)
There are no duplicate entries. There is one row for each Host/User combination. But if you do need to remove one, have a look at DROP USER
Addition to answer
This query will show you that the empty users actually have a ” name:
This means they can be removed with:
Do make sure you really want to remove them though. Maybe there are some processes that need them to be there and connect using these different hostnames.