Connection to test-proxy.proxy-#############.eu-west-1.rds.amazonaws.com 3306 port [tcp/mysql] succeeded
執行下列命令,以使用 Proxy 連線到 RDS 資料庫執行個體:
mysql -h proxy_endpoint -u username -p
**注意:**將 proxy_endpoint 替換為您的 Proxy 伺服器的位址。
輸出範例:
Server version: 5.7.28-log
Copyright (c) 2000, 2018, 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 -h test-proxy.proxy-#############.eu-west-1.rds.amazonaws.com -u admin --ssl-mode=VERIFY_IDENTITY --ssl-ca=AmazonRootCA1.pem -p
注意: Proxy 使用萬用字元憑證。如果您使用 MySQL 用戶端以 TLS/SSL VERIFY_IDENTITY 模式連線,則必須使用與 MySQL 8.0 相容的 mysql 命令。
輸出範例:
Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 12659040
Server version: 5.7.28-log
Copyright (c) 2000, 2018, 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.