MySQL users are associated to a location for example
Using root as an example:
root@localhost
root@127.0.0.1root@::1
The location tells mysql where that user can login from.
Now assuming you have added these lines to your HOSTS file
127.0.0.1 localhost
::1 localhost
All 3 of these are actually alias's for the same location.
Now lets assume you want to login to MySQL from another PC on your home network you would have to setup a new location allowed for root.
So you woudl now have
root@192.168.0.100 ( for example )
Or if you wanted to login from any PC on your local network you could do this
root@192.168.0Once you have set a password on one of these 'root' users it should set it for all of them.
To test I am correct use this address to get to phpMyAdmin
'http://127.0.0.1/phpmyadmin' and see if it lets you in without a password. If it does then set the same password you used for the first 'root'.
Also try the same with 'http://::1/phpmyadmin'