Mysql – Error during MySQL encryption, Code: 3185. “Can’t find master key from keyring (…)”

encryptionMySQL

I was trying to configure MySQL keyring plugin and I did the following:

• Made sure that keyring_file.dll is present either in C:\Program Files (x86)\MySQL\MySQL Server 5.7\lib\plugin directory.

• added to my.ini:

innodb_file_per_table = 1
early-plugin-load = keyring_file.dll

• restarted MySQL service and even the whole dedicated Windows Server
• run the following SQL(s):

ALTER TABLE <table_name> ENCRYPTION='Y';

and I got the following error:

Error Code: 3185. Can't find master key from keyring, please check in
the server log if a keyring plugin is loaded and initialized
successfully.

Very strange, because I did the same on other server with the same version of MySQL and it worked.

I executed this:

SELECT @@plugin_dir 

and it shows right directory:

C:\Program Files (x86)\MySQL\MySQL Server 5.7\lib\plugin\

WHY do I get that error ??

Best Answer

What is your MySQL Version?

I find the following 'solution' and i will try upgrade mine 5.7.20 to 5.7.22:

Posted by developer:

Fixed in 5.7.22, 8.0.4, 9.0.0.

Cosmetic change to error message. No changelog entry needed.

Maybe it will solve your problem.