REQUIRE
Example
Section titled “Example”CREATE USER 'user1'@'localhost' IDENTIFIED BY 'password';ALTER USER 'user1'@'localhost' REQUIRE SSL;Output
Section titled “Output”Query OK, 0 rows affected (0.04 sec)Explanation
Section titled “Explanation”In the provided example, a new user ‘user1’ is created. Next, the REQUIRE SSL clause is used to ensure that the user can only connect to the MySQL server through an encrypted channel. The server returns Query OK indicating that the operations were successful.