penname penname - 7 months ago 20
SQL Question

MySQL: why are there multiple root users?

On a clean install of MySQL (version: 5.5.49-0ubuntu0.14.04.1) running

SELECT User FROM mysql.user;
returns

+------------------+
| User |
+------------------+
| root |
| root |
| debian-sys-maint |
| root |
+------------------+
4 rows in set (0.00 sec)


Can someone please tell me why there are 3 root users?

Answer

Try SELECT * FROM mysql.user; or SELECT User,Host FROM mysql.user; and you will see..

One is for localhost, the other for 127.0.0.1 etc. - nothing to worry about.

Comments