Help Center/ TaurusDB/ FAQs/ Database Usage/ What Should I Do If the "Incorrect parameter count..." Error Is Reported for the AES_ENCRYPT Function?
Updated on 2026-03-19 GMT+08:00

What Should I Do If the "Incorrect parameter count..." Error Is Reported for the AES_ENCRYPT Function?

The number of input parameters of the AES_ENCRYPT function is determined by the block_encryption_mode parameter. The usage guidelines are the same as those in the open-source community.

  • If this parameter is set to xxx-xxx-ecb (for example, aes-128-ecb), the AES_ENCRYPT function requires two input parameters.
  • If this parameter is set to xxx-xxx-cbc (for example, aes-128-cbc), the AES_ENCRYPT function requires three input parameters.

If you have migrated data from a MySQL database or a similar one, and AES_ENCRYPT works properly in the source database, to ensure consistent encryption and decryption results, set block_encryption_mode of the TaurusDB database to the same value as that of the source database on the console.