| Did this page help you? Yes No Tell us about it... |
Once Amazon RDS provisions your DB Instance, you can use any standard SQL client application to connect to the instance. In this example, you connect to a DB Instance running the MySQL database engine using the MySQL command line tools.
![]() | Note |
|---|---|
For more information on using MySQL, go to the MySQL documentation. |
To connect to a DB Instance using the MySQL monitor
Type the following command at a command prompt to connect to a DB Instance using the MySQL monitor; substitute the DNS name for your DB Instance.
PROMPT> mysql -h myinstance.mydnsnameexample.rds.amazonaws.com -P 3306 -u mymasteruser -p
You will see output similar to the following.
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 350 Server version: 5.1.32-log MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
To connect to a DB Instance with SSL using the MySQL monitor
Download the public key for the Amazon RDS signing certificate from https://rds.amazonaws.com/doc/mysql-ssl-ca-cert.pem.
Type the following command at a command prompt to connect to a DB Instance with SSL using the MySQL monitor; substitute the DNS name for your DB Instance and the SSL certificate file name as appropriate. Enter the master user password when prompted.
PROMPT> mysql -h myinstance.mydnsnameexample.rds.amazonaws.com --ssl_ca=cert-mysql-ssl-ca.pem
You will see output similar to the following.
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 350 Server version: 5.1.32-log MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>