SELECT user, host FROM mysql.user;为我们生成了如下输出:
+------------------+---------------------------------------+
| user | host |
+------------------+---------------------------------------+
| % | % |
| plutot_admin | % |
| plutot_dev | % |
| plutot_intrn01 | % |
| plutot_intrn02 | % |
| plutot_ntrn01 | % |
| plutot_ntrn02 | % |
| plutot_tech | % |
| plutot_ntrn02 | * |
| plutouser | * |
| ... | ... |%是通配符主机,但*在查询输出中有什么意义?
发布于 2020-07-20 13:48:14
MariaDB (但也包括MySQL)不受限制,不会检查主机名(RFC2181)的有效性,因此不会声明主机名是否包含星号或其他无效字符。
星号不会被解释为通配符,通配符仅限于百分号(%)和下划线(_)。
这意味着有人使用CREATE USER 'plutouser'@'*'命令创建了用户,很可能假设星号将被解释为通配符。
https://stackoverflow.com/questions/62988512
复制相似问题