引言
MySQL的账号由 '用户名'@'主机或IP' 构成,当用户连接匹配到mysql权限表中不同账号时,将被赋予对应的权限
1 | mysql> select user,host from mysql.user; |
2 | +---------------+-----------+ |
3 | | user | host | |
4 | +---------------+-----------+ |
5 | | | | |
6 | | test | | |
7 | | | % | |
8 | | test | % | |
9 | | mysql.session | localhost | |
10 | | mysql.sys | localhost | |
11 | | root | localhost | |
12 | | | node1 | |
13 | | test | node1 | |
14 | +---------------+-----------+ |
15 | 9 rows in set (0.00 sec) |