Skip to content

Commit 3fc14fa

Browse files
Update the Encrypting a File-Per-Table Tablespace examples (#291)
modified: docs/security/data-at-rest-encryption.mdmodified: docs/security/data-at-rest-encryption.md
1 parent f37365f commit 3fc14fa

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/security/data-at-rest-encryption.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,13 @@ The output could be the following:
166166
The [CREATE TABLESPACE](https://dev.mysql.com/doc/refman/5.7/en/create-tablespace.html) statement is extended to allow the `ENCRYPTION=['Y/N']` option to encrypt a File-per-Table tablespace.
167167

168168
```sql
169-
CREATE TABLE myexample (id INT mytext varchar(255)) ENCRYPTION='Y';
169+
CREATE TABLESPACE tablespace_name ENCRYPTION='Y';
170170
```
171171

172172
To enable encryption to an existing tablespace, add the `ENCRYPTION` option to the `ALTER TABLE` statement.
173173

174174
```sql
175-
CREATE TABLE myexample ENCRYPTION='Y';
175+
ALTER TABLESPACE myexample ENCRYPTION='Y';
176176
```
177177

178178
You must add the `ENCRYPTION` option to [ALTER TABLE](https://dev.mysql.com/doc/refman/5.7/en/alter-table.html) to change the table encryption state. Without the `ENCRYPTION` option, an encrypted table remains encrypted or an unencrypted table remains unencrypted.
@@ -199,11 +199,10 @@ Add the `innodb_encrypt_tables` variable to my.cnf to automatically encrypt gene
199199
Adding ENCRYPTION=NO to either a CREATE TABLE or ALTER TABLE statement results in a warning.
200200
|
201201

202-
The [CREATE TABLESPACE](https://dev.mysql.com/doc/refman/5.7/en/create-tablespace.html) statement is extended to allow the `ENCRYPTION=['
203-
Y/N']` option.
202+
The [CREATE TABLESPACE](https://dev.mysql.com/doc/refman/5.7/en/create-tablespace.html) statement is extended to allow the `ENCRYPTION=['Y/N']` option.
204203

205204
```sql
206-
CREATE TABLE t1 (id INT) ENCRYPTION='Y';
205+
CREATE TABLESPACE tablespace_name ENCRYPTION='Y';
207206
```
208207

209208
To encrypt an existing table, add the ENCRYPTION option in the `ALTER TABLE` statement.

0 commit comments

Comments
 (0)