Reputation: 1682
MySQL 8 doesn't show REQUIRE SSL
in the SHOW GRANTS
output.
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 |
+----------------------------------------------+
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`@`%` |
+----------------------------------+
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?
Upvotes: 5
Views: 4740
Reputation: 562641
mysql [localhost:8014] {msandbox} ((none)) > show create user 'test';
+--------------------------------------------------------------------------------+
| CREATE USER for test@% |
+--------------------------------------------------------------------------------+
| CREATE USER 'test'@'%' IDENTIFIED WITH 'caching_sha2_password' REQUIRE SSL ... |
+--------------------------------------------------------------------------------+
See https://dev.mysql.com/doc/refman/8.0/en/show-create-user.html
Upvotes: 6