- Page 1: 1. Create Encryption Policy
- Page 2: 2. Assign the column encryption settings
- Page 3: 3. Grant Encryption Privileges
- Page 4: 4. Save MyDiamo Setting
- Page 5: 5. Migrate Table to MyDiamo Storage
3. Grant Encryption Privileges
- In order to execute encryption, you should migrate the table from MySQL storage to MyDiamo storage, and migration could be done only by the users who have encryption privilege of those table. Therefore you should grant privileges DB user who is going to have the duty of encryption in MyDiamo CLI. The command looks like:
MyDiamo > SET PRIV ENC <USER>”<OWNER>”<TABLE>”<COLUMN>”<ENC PRIV>”<DEC PRIV>
In <ENC PRIV> and <DEC PRIV>, you can input 0 or 1. 1 will give <USER> the privileges, but 0 will not.
For example, if you want to enable encryption of the “ADDRESS” column in the “EMPLOYEE” table of “JAMES” owner from “SYS” user, the command looks like:
MyDiamo > SET PRIV ENC SYS"JAMES"EMPLOYEE"ADDRESS"1"0
Continue: 4. Save MyDiamo Setting