📝

【infra】rds(mysql)に接続

2021/09/07に公開

ec2ログイン

ssh -i "Mykeypair.pem" ec2-user@13.112.121.67                 2021-09-07 04:56:05
Warning: Permanently added '13.112.121.67' (ECDSA) to the list of known hosts.
Last login: Sun Sep  5 21:48:45 2021 from m106072036034.v4.enabler.ne.jp

       __|  __|_  )
       _|  (     /   Amazon Linux 2 AMI
      ___|\___|___|

https://aws.amazon.com/amazon-linux-2/

rdsログイン

[ec2-user@ip-10-0-0-240 ~]$ mysql -h database-1.cotqzffqvzlc.ap-northeast-1.rds.amazonaws.com -P 3306 -u wordpress -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 1842
Server version: 8.0.23 Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]> 

Discussion