Erro ao tentar criar a tabela criptografada
1 2 3 4 5 |
mysql> CREATE TABLE faturamento (empresa varchar(50), fatura int) ENGINE=InnoDB ENCRYPTION='Y'; ERROR 3185 (HY000): Can't find master key from keyring, please check in the server log if a keyring plugin is loaded and initialized successfully. |
Verificando plugin instalado
1 2 3 4 5 6 7 |
mysql> show variables like '%keyring%'; +--------------------+-------+ | Variable_name | Value | +--------------------+-------+ | keyring_operations | ON | +--------------------+-------+ 1 row in set (0.00 sec) |
Instalando o plugin ‘keyring_file.so’
1 2 |
mysql> install plugin keyring_file soname 'keyring_file.so'; Query OK, 0 rows affected (0.01 sec) |
Verificando plugin instalado
1 2 3 4 5 6 7 8 |
mysql> show variables like '%keyring%'; +--------------------+--------------------------------+ | Variable_name | Value | +--------------------+--------------------------------+ | keyring_file_data | /var/lib/mysql-keyring/keyring | | keyring_operations | ON | +--------------------+--------------------------------+ 2 rows in set (0.00 sec) |
Criando tabela criptografada
1 2 3 |
mysql> CREATE TABLE faturamento (empresa varchar(50), fatura int) -> ENGINE=InnoDB ENCRYPTION='Y'; Query OK, 0 rows affected (0.01 sec) |