1312 •It empties the cache at server shutdown. (This means the cache is not persistent across server restarts.) Cache clearing operations affect the authentication requirements for subsequent client connections. For each user account, the first client connection for the user after any of the following operations must use a secure connection (made using TCP using TLS credentials, a Unix socket file, or shared memory) or RSA key pair-based password exchange: FLUSH PRIVILEGES  clears the entire cache and affects all accounts that use the caching_sha2_password  plugin. The other operations clear specific cache entries and affect only accounts that are part of the operation. Once the user authenticates successfully, the account is entered into the cache and subsequent connections do not require a secure connection or the RSA key pair, until another cache clearing event occurs that affects the account. (When the cache can be used, the server uses a challenge-response mechanism that does not use cleartext password transmission and does not require a secure connection.) MySQL provides two authentication plugins that implement SHA-256 hashing for user account passwords: This section describes the original noncaching SHA-2 authentication plugin. For information about the caching plugin, see Section 6.4.1.2, “Caching SHA-2 Pluggable Authentication” . In MySQL 8.0,  caching_sha2_password  is the default authentication plugin rather than  mysql_native_password . For information about the implications of this change for server operation and compatibility of the server with clients and connectors, see caching_sha2_password as the Preferred Authentication Plugin. Because  caching_sha2_password  is the default authentication plugin in MySQL 8.0 and provides a superset of the capabilities of the  sha256_password authentication plugin,  sha256_password  is deprecated; expect it to be removed in a future version of MySQL. MySQL accounts that authenticate using sha256_password  should be migrated to use  caching_sha2_password instead. Important Important To connect to the server using an account that authenticates with the sha256_password  plugin, you must use either a TLS connection or an unencrypted connection that supports password exchange using an RSA key pair, as described later in this section. Either way, the  sha256_password  plugin uses MySQL’s encryption capabilities. See Section 6.3, “Using Encrypted Connections” . 6.4.1.3 SHA-256 Pluggable Authentication •After account creation. •After a password change for the account. •After  RENAME USER  for the account. •After  FLUSH PRIVILEGES . • sha256_password : Implements basic SHA-256 authentication. • caching_sha2_password : Implements SHA-256 authentication (like  sha256_password ), but uses caching on the server side for better performance and has additional features for wider applicability. Authentication Plugins