Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 38.5Mb
PDF (A4) - 38.5Mb
PDF (RPM) - 33.3Mb
HTML Download (TGZ) - 8.1Mb
HTML Download (Zip) - 8.2Mb
HTML Download (RPM) - 7.0Mb
Man Pages (TGZ) - 134.2Kb
Man Pages (Zip) - 190.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

MySQL 8.0 Reference Manual  /  ...  /  mysql_reset_server_public_key()

27.7.7.61 mysql_reset_server_public_key()

void mysql_reset_server_public_key(void)

Description

Clears from the client library any cached copy of the public key required by the server for RSA key pair-based password exchange. This might be necessary when the server has been restarted with a different RSA key pair after the client program had called mysql_options() with the MYSQL_SERVER_PUBLIC_KEY option to specify the RSA public key. In such cases, connection failure can occur due to key mismatch. To fix this problem, the client can use either of the following approaches:

  • The client can call mysql_reset_server_public_key() to clear the cached key and try again, after the public key file on the client side has been replaced with a file containing the new public key.

  • The client can call mysql_reset_server_public_key() to clear the cached key, then call mysql_options() with the MYSQL_OPT_GET_SERVER_PUBLIC_KEY option (instead of MYSQL_SERVER_PUBLIC_KEY) to request the required public key from the server Do not use both MYSQL_OPT_GET_SERVER_PUBLIC_KEY and MYSQL_SERVER_PUBLIC_KEY because in that case, MYSQL_SERVER_PUBLIC_KEY takes precedence.

Return Values

None.

Errors

None.


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.