| « PreviousNext » | |
![]() ![]() ![]() | 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 MySQL monitor commands. One GUI-based application you can use to connect is MySQL Workbench; for more information, go to the Download MySQL Workbench page. 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/rds-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-rds-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>