Skip to main content

Module auth

Module auth 

Source
Expand description

MySQL authentication implementations.

This module implements the MySQL authentication plugins:

  • mysql_native_password: SHA1-based (legacy, MySQL < 8.0 default)
  • caching_sha2_password: SHA256-based (MySQL 8.0+ default)

§mysql_native_password

Password scramble algorithm:

SHA1(password) XOR SHA1(seed + SHA1(SHA1(password)))

§caching_sha2_password

Fast auth (if cached on server):

XOR(SHA256(password), SHA256(SHA256(SHA256(password)) + seed))

Full auth requires TLS or RSA public key encryption.

Modules§

caching_sha2
Response codes for caching_sha2_password protocol.
plugins
Well-known authentication plugin names.

Functions§

caching_sha2_password
Compute caching_sha2_password fast authentication response.
generate_nonce
Generate a random nonce for client-side use.
mysql_native_password
Compute mysql_native_password authentication response.
sha256_password_rsa
Scramble password for sha256_password plugin using RSA encryption.
xor_password_with_seed
XOR password with seed for cleartext transmission over TLS.