I try to connect to my RDS MySQL instance from an SSH connection to my ec2 server (through PUTTY) as outlined here: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToInstance.html#USER_ConnectToInstance.CLI
But I get:
-bash: mysql: command not found
I think maybe I have to install the MySQL Utility client on my ec2 linux server? If this is the case how do I do this?
I try to run the mysql
command from my /home/ec2-user
directory.
To connect to a private RDS DB instance from a local machine using an EC2 instance as a jump server, follow these steps: Launch and configure your EC2 instance and configure the network setting of the instance. Configure the RDS DB instance's security groups. Connect to the RDS DB instance from your local machine.
When using Amazon Linux 2 AMI, we need to install mysql. Use this command to install mysql on the instance:
sudo yum install mysql
And then you can connect using this command:
mysql -h change-to-your-rds-endpoint.rds.amazonaws.com -u <USER> -p
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With