Error number: MY-013672; Symbol: ER_IB_MSG_MASTER_KEY_ROTATED; SQLSTATE: HY000
Message: The InnoDB Encryption Master Key has been rotated in %d tablespaces.
Error MY-013672, also known as ER_IB_MSG_MASTER_KEY_ROTATED, is a MySQL error that indicates that the master encryption key of an encrypted InnoDB table has been rotated. InnoDB table encryption is part of the data at rest security feature and is used to protect the confidentiality of sensitive data stored in the database.
Error Message
When this error occurs, the following message is displayed:
“Message: Master key rotation of an encrypted InnoDB table was not successful.”
Common Cases
The most common cause for this error is when users try to enable table encryption on an existing encrypted InnoDB table, but the existing master encryption key and/or the new key specified by the user are not valid. It can also occur when the user uses an incorrect key rotation parameter for an already existing encrypted InnoDB table.
Solution
The most effective way to resolve this error is to use the correct master key and key rotation parameters when enabling encryption on an existing InnoDB table. If a valid key rotation parameter is used, the existing master encryption key used for encrypting the data will be replaced by the new provided one.
Also, users should ensure that they have the correct master key in place while they are encrypting or rotating the encryption keys of InnoDB tables. Otherwise, the master encryption key of the encrypted InnoDB table will not be successfully rotated leading to the error.
Additionally, performing a full backup of the database before encrypting the InnoDB table or before rotating the encryption keys of an InnoDB table is recommended, in case something goes wrong and data gets corrupted or lost. Users should also be aware that encrypting InnoDB tables with the page format depending on the key length and use of encryption algorithms must be carefully evaluated. This is because different encryption algorithms have distinct strengths as well as implementation limitations.
Finally, for more information on encrypting InnoDB tables and rotating the encryption keys, users should refer to the official MySQL documentation.