Reputation: 35265
Here's a screenshot of the first three columns of the users
table in the mysql
DB available from phpMyAdmin in a XAMPP installation.
What's the purpose of the Host values?
Upvotes: 1
Views: 87
Reputation: 9056
You can have one username on multiple hosts, so you can decide whether to give this user extra-permissions or not.
For example you have user emanuil
and you grant him all privileges on localhost, but if somebody connects from differen host with username emanuil
, you wouldn't give him drop table
privelege because of security reasons
'emanuil'@'127.0.0.1' - All privileges
'emanuil'@'%' - All priveleges except drop table
Upvotes: 2
Reputation: 10780
The host
column states from which host the user is allowed to connect. See documentation.
Upvotes: 3