REQUIRE
REQUIRE in SQL is a clause used in combination with the GRANT command to stipulate certain security necessities. It specifies that a particular SSL certificate must be presented by the client before the server allows a connection. There are various SSL requirements such as "NONE", "SSL", "X509", "CIPHER", "ISSUER", "SUBJECT" and so on, each serving different security functions.
Example
Output
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.