In mysql, user1 @ host1 is a different user than user1 @ host2 without a relationship between them. Fortunately, these three root users must have the same password and permissions.
Use caution when deleting these root accounts. In one example, the manual warns that you are using bind-address
.. If you bind the server to :: 1, it only accepts connections at this address. In this case, first make sure that the account 'root' @ ':: 1' is present in the mysql.user table, so you can connect to the server to disable it.
The confusion may be that mysql can resolve the host IP address as some host as the host name and use the appropriate permissions (or if they do not match it, it can match the template host% if present). You may run into problems if you are particularly concerned about the performance or security of dns and use skip_name_resolve . That is, read http://dev.mysql.com/doc/refman/5.5/en/host-cache.html
For example, I found that connecting jdbc to localhost would use 127.0.0.1, and therefore I would have to define my users accordingly, and not as user @localhost.
source share