Encryption

Home / Guide / Operation / Encryption

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