开发者

User hosts in MySQL

Here's a screenshot of the first three columns of the users table in the mysql DB availa开发者_运维百科ble from phpMyAdmin in a XAMPP installation.

What's the purpose of the Host values?

User hosts in MySQL


The host column states from which host the user is allowed to connect. See documentation.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜