gameboyLV commented on issue #19824:
URL:
https://github.com/apache/shardingsphere/issues/19824#issuecomment-1204654946
Step 1: Create MySql datatable (Version 8.0.27)
```
CREATE TABLE sys_account_2 (
id bigint NOT NULL DEFAULT '0',
login_name varchar(100) DEFAULT '',
mobile varchar(50) DEFAULT '',
mobile_index varchar(500) CHARACTER SET ascii COLLATE ascii_general_ci NOT
NULL INVISIBLE,
mobile_cipher varchar(100) CHARACTER SET ascii COLLATE ascii_general_ci
NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
ROW_FORMAT=DYNAMIC;
```
```
insert into sys_account_2(id,login_name,mobile,mobile_index,mobile_cipher)
values(1,'system','','ki54eZF1zMri+PX8X4OPfA==WkgBwCnnGTa0GHW3xypWXA==3SV5gW6/sZdiUHPj4+NMlg==Xsm1em/q9eeeCrAzP1f0EQ==CpsIEZkmi549amLpbLPCLg==','MyOShk4kjRnds7CZfU5NCw==');
```
Step 2: Config ShardingSphere-Proxy (Version 5.1.2)
```
databaseName: ds2
dataSources:
ds2:
url:
jdbc:mysql://192.168.1.236:3306/ds2?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !ENCRYPT
encryptors:
aes_encryptor:
type: AES
props:
aes-key-value: 123456abc
md5_encryptor:
type: MD5
tables:
sys_account2:
columns:
mobile:
cipherColumn: mobile_cipher
encryptorName: aes_encryptor
queryWithCipherColumn: true
```
Step 3: Reboot ShardingSphere-Proxy, send flowing request
```
SELECT * FROM sys_account_2;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]