如何检查用户是否需要Mysql中的SSL? [英] How to check if a user requires SSL in Mysql?
问题描述
我正在使用带有Mysql版本5.7.22的AWS RDS Mysql实例进行测试.
I'am testing with an AWS RDS Mysql instance with Mysql verison 5.7.22.
After requiring ssl for a specific user, 'root' (GRANT USAGE ON . TO 'root'@'%' REQUIRE SSL;"), this is the result of SHOW GRANTS for root;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@% |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD,
PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES,
CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE,
REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE,
ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'root'@'%'
WITH GRANT OPTION |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
无论如何,我可以检查用户是否需要ssl吗?显示赠款输出不提及ssl.我认为显示授予"是正确使用的命令,因为最初通过GRANT USAGE对用户要求使用ssl.
Is there anyway I can check to see that ssl is required for a user? Show grants output doesn't mention ssl. I would think that Show grants is the right command to use because ssl was initially required on the user via GRANT USAGE.
推荐答案
One thing I found was that from the client, you can run status to determine if the current connection is using ssl. Not sure if there's a way to do it for a specific user though.
克里斯·怀特(Chris White)的解决方案( MySQL:要求SSL未显示在赠款中)适用于特定用户
Chris White's solution(MySQL: REQUIRE SSL not shown in grants) works for a specific user
这篇关于如何检查用户是否需要Mysql中的SSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!