MySQL:未在授权中显示SSL [英] MySQL: REQUIRE SSL not shown in grants

查看:138
本文介绍了MySQL:未在授权中显示SSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MySQL 8在SHOW GRANTS输出中未显示REQUIRE SSL.

MySQL 8 doesn't show REQUIRE SSL in the SHOW GRANTS output.

在MariaDB上,当我使用REQUIRE SSL创建用户时,它会显示在赠款中:

On MariaDB, when I create a user using REQUIRE SSL, it is shown in the grants:

Server version: 10.2.22-MariaDB MariaDB Server

MariaDB [(none)]> drop user if exists 'test'; 
MariaDB [(none)]> create user 'test' REQUIRE SSL;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> show grants for 'test';
+----------------------------------------------+
| Grants for test@%                            |
+----------------------------------------------+
| GRANT USAGE ON *.* TO 'test'@'%' REQUIRE SSL |
+----------------------------------------------+

但是在MySQL8中,我没有看到REQUIRE SSL指示:

But in MySQL8, I don't see REQUIRE SSL indicated:

mysql> drop user if exists 'testu';
mysql> create user 'testu' REQUIRE SSL;
mysql> show grants for 'test';
+----------------------------------+
| Grants for test@%                |
+----------------------------------+
| GRANT USAGE ON *.* TO `test`@`%` |
+----------------------------------+

尝试不使用SSL进行连接确实会产生错误,但是如果授权中未显示该信息,我如何查看启用了该功能的用户呢?

Attempting to connect without SSL does properly give an error, but how can I see which users have it enabled if it's not shown in the grants?

推荐答案

mysql [localhost:8014] {msandbox} ((none)) > show create user 'test';
+--------------------------------------------------------------------------------+
| CREATE USER for test@%                                                         |
+--------------------------------------------------------------------------------+
| CREATE USER 'test'@'%' IDENTIFIED WITH 'caching_sha2_password' REQUIRE SSL ... |
+--------------------------------------------------------------------------------+

请参见 https://dev.mysql. com/doc/refman/8.0/en/show-create-user.html

这篇关于MySQL:未在授权中显示SSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆