MySQL connections
DataMasque masks MySQL tables in place.
- Required privileges
- Connection parameters
- Encrypted connections
- Supported data types
- Unsupported key columns
Required privileges
A DataMasque connection for MySQL requires:
CREATE TEMPORARY TABLESprivileges to the database.CREATE,DROP,INDEX,SELECT,UPDATE,INSERT,ALTERandREFERENCESprivileges to the target tables.
GRANT CREATE TEMPORARY TABLES ON <target database>.* TO <connection user>@<DataMasque host>;
GRANT CREATE, SELECT, UPDATE, INSERT, ALTER, REFERENCES ON <target database>.<target tables> TO <connection user>@<DataMasque host>;
Connection parameters
For MySQL databases, the following field is optional:
| MySQL SSL Certificate | Choose an SSL Certificate to verify the server's certificate. These can be uploaded using the Files interface. |
Encrypted connections
DataMasque supports encrypted connections to MySQL and MariaDB databases. Without an SSL certificate, DataMasque encrypts the connection whenever the server supports it, but does not verify the server's certificate. To verify the server, upload SSL certificates through the Files interface and select them on the connection. The connection then fails rather than connect without encryption.
Certificates must be uploaded as a .zip file containing the following file(s).
| File Name | Description |
|---|---|
| ca.pem | The Certificate Authority (CA) file. |
| client-cert.pem (optional) | The client public key certificate file. |
| client-key.pem (optional) | The client private key file. |
Depending on the server configuration, client-cert.pem and client-key.pem may not be required.
For example, AWS RDS requires only the Certificate Authority file.
For more information on configuring MySQL to use encrypted connections, see here: https://dev.mysql.com/doc/refman/8.0/en/using-encrypted-connections.html.
For more information on configuring MariaDB to use encrypted connections, see here: https://mariadb.com/kb/en/secure-connections-overview/.
Supported data types
The following MySQL and MariaDB data types are supported.
| Data type | Description |
|---|---|
| char(n) | Fixed-length character data of n size. |
| varchar(n) | Variable-length character data of n size. |
| text | 32 bit string value. |
| decimal, numeric | Numerical value with decimal precision. |
| tinyint | 8 bit integer value. |
| smallint | 16 bit integer value. |
| mediumint | 24 bit integer value. |
| int | 32 bit integer value. |
| bigint | 64 bit integer value. |
| float | 32 bit floating point value. |
| double | 64 bit floating point value. |
| date | Date value with no time. |
| datetime, timestamp | Date value with a time. |
| time | Time value. |
| json | For storing JSON (JavaScript Object Notation) data. |
Important! MySQL
autoincrementprimary keys are not currently supported for themask_unique_keytask type.
Unsupported key columns
| Data Type | Unsupported Format |
|---|---|
| decimal | All |
| numeric | All |
| float | All |