(base) gengdeMacBook-Pro:conf js2thon$ mysql -h127.0.0.1 -uroot -P3308
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.0.20-Sharding-Proxy 4.1.0
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show tables;
+----------------------+------------+
| Tables_in_encrypt_db | Table_type |
+----------------------+------------+
| t_encrypt | BASE TABLE |
+----------------------+------------+
1 row in set (0.03 sec)
mysql> select * from t_encrypt;
+----------+---------+-------------+
| order_id | user_id | phone |
+----------+---------+-------------+
| 10 | 0 | 18516014911 |
| 11 | 1 | 18516014922 |
| 12 | 2 | 18516014933 |
| 13 | 3 | 18516014944 |
| 14 | 4 | 18516014955 |
+----------+---------+-------------+
5 rows in set (0.09 sec)
mysql> select * from t_encrypt;
+----------+---------+--------------------------+-------------+
| order_id | user_id | phone_cipher | phone |
+----------+---------+--------------------------+-------------+
| 10 | 0 | uFZ1RGQfxsUM+GUJqI5rlQ== | 18516014911 |
| 11 | 1 | SGxnMaUHY/HR50hJcYp6Vg== | 18516014922 |
| 12 | 2 | Z5NBefdS9WN3Bl6p45R1Dw== | 18516014933 |
| 13 | 3 | SKqYOUF4dxloUH5M9t/wEg== | NULL |
| 14 | 4 | 4q+dOa+bxUTFSzX6AOjvUg== | NULL |
+----------+---------+--------------------------+-------------+
(向右滑动,查看更多)
Key-Value:简单的静态键值对 动态生成的凭据:由Vault根据客户端请求生成 加密密钥:用于使用客户端数据执行加密功能
(base) js2thondeMacBook-Pro:Downloads js2thon$ mysql -u v-my-r-owFmZ3LFu -pM8DdaYZXYRU-rNIm2CbQ
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1379
Server version: 5.6.41-log MySQL Community Server (GPL)
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
(向右滑动,查看更多)
mysql> use mysql_test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+----------------------+
| Tables_in_mysql_test |
+----------------------+
| account |
+----------------------+
mysql> select * from account;
+------+------+
| id | name |
+------+------+
| 100 | abc |
+------+------+
1 row in set (0.00 sec)
mysql> insert into account values(101,'def');
ERROR 1142 (42000): INSERT command denied to user 'v-my-r-owFmZ3LFu'@'localhost' for table 'account'
4. 问题和思考
热文推荐