The server raises ER_AES_INVALID_KDF_NAME when AES_ENCRYPT, AES_DECRYPT, or CREATE/ALTER TABLE ENCRYPTION clauses receive an unsupported or misspelled key-derivation function name.
ER_AES_INVALID_KDF_NAME (MySQL error 3235) appears when the KDF argument for AES_ENCRYPT or AES_DECRYPT is not hkdf or pbkdf2_hmac. Supply one of the supported names, upgrade to MySQL 5.7.40 or 8.0.30+, and rerun the statement to resolve the error.
ER_AES_INVALID_KDF_NAME
MySQL throws error 3235 with SQLSTATE HY000 when an encryption call specifies a key derivation function (KDF) that the server does not recognise. The accepted names are hkdf and pbkdf2_hmac, introduced in MySQL 5.7.40 and 8.0.30.
The error halts the statement, preventing encryption or decryption and leaving sensitive data unreadable until the KDF name is corrected.
The primary cause is passing an unsupported or misspelled KDF argument to AES_ENCRYPT, AES_DECRYPT, or ALTER INSTANCE ROTATE INNODB MASTER KEY. Using the feature on servers older than 5.7.40 or 8.0.30 also triggers the exception.
Configuration files that set default_encryption_key_derivation to an invalid value will cause every subsequent encryption call to fail.
Validate the KDF argument and use only hkdf or pbkdf2_hmac. Upgrade the server if it predates the feature. Restart the client session after changing my.cnf or global variables.
Galaxy users can surface the failing statement inside the SQL editor, adjust the argument, and rerun instantly with version control to verify the fix.
When migrating from OpenSSL functions, developers often copy legacy code that includes sha1 as the KDF. Replace it with hkdf for forward-compatible security.
Automated key rotation scripts sometimes rely on server defaults. Add an explicit KDF name in the CALL rotate_key procedure to guarantee compatibility after upgrades.
Standardise on a single KDF across the organisation and store it in a parameter file checked into Git. Monitor ERROR logs for 3235 to catch misconfigurations early.
Use Galaxy Collections to share approved encryption snippets so teammates never paste unsupported parameters.
ER_UNSUPPORTED_CIPHER (3141) fires when an invalid cipher name is supplied. ER_AES_INVALID_IV (3236) indicates an initialisation vector of the wrong length. Both resolve by correcting parameters or upgrading client libraries.
Using hkfd or pbkdf2 instead of the exact hkdf or pbkdf2_hmac string.
Running the command on versions earlier than 5.7.40 or 8.0.30 that lack KDF support.
my.cnf sets default_encryption_key_derivation to an obsolete value, affecting every session.
Raised when an invalid or deprecated cipher name is supplied to encryption functions.
Indicates the initialisation vector length does not match AES block size.
Appears when user-defined functions in replication streams fail validation.
Existing encrypted data remains intact. The error only blocks new encryption or decryption attempts that use the invalid KDF.
No. MySQL enforces valid KDF names for security. Always supply hkdf or pbkdf2_hmac.
hkdf is faster for most workloads, while pbkdf2_hmac offers configurable iteration counts for added resistance to brute-force attacks.
Galaxy flags the error inline, offers AI-powered fixes, and lets you save the corrected query in a shared Collection to prevent repeat mistakes.