RIGHT JOIN SELECT * FROM TABLE1 RIGHT JOIN TABLE2 ON condition 4. LEFT JOIN SELECT * FROM TABLE1 LEFT JOIN TABLE2 ON condition 3. INNER JOIN SELECT * FROM TABLE1 INNER JOIN TABLE2 where condition 2. (Optional) Create VPC, EC2 instance, and MySQL instance using AWS CloudFormation. How to delete stored procedure DROP PROCEDURE sp_name Joins 1. How to call Stored procedure CALL sp_name 3. Create a Stored Procedure CREATE PROCEDURE sp_name(p1 datatype)ĮND 2. Drop a Trigger DROP TRIGGER trigger_name Stored Procedures 1. Create a Trigger CREATE TRIGGER trigger_name trigger_time trigger_event Deleting a View DROP VIEW View_name Triggers 1. How to call view SELECT * FROM View_name 3. DROP INDEX DROP INDEX index_name ON table_name Views 1. CREATE INDEX CREATE INDEX index_name on table_name(column_name) ĬREATE UNIQUE INDEX index_name on table_name(column_name) 2. DELETE DELETE FROM table_name where condition Example DELETE from EMPLOYEE where empId='0001' Indexes 1. WHERE condition Example UPDATE EMPLOYEE SET dept = 'Sales' WHERE empId='0001' 4. Example SELECT * FROM EMPLOYEE where dept ='sales' 3. Example INSERT INTO EMPLOYEE VALUES (0001, 'Ava', 'Sales') 2. INSERT INSERT INTO table_name (column1, column2, column3. COMMENT Single-Line Comments: -Line1 Multi-Line comments: /* Line1, RENAME RENAME TABLE table_name1 to new_table_name1 6. ALTER ALTER TABLE Table_name ADD column_name datatype Example INSERT INTO EMPLOYEE VALUES (0001, 'Dave', 'Sales') 3.
Supports many operating systems like Linux*,CentOS*, Solaris*,Ubuntu*,Windows*, MacOS*,FreeBSD* and others.High productivity as it uses stored procedures, triggers, views to write a highly productive code.Figure 5. Define the Connection Name value, such as MyFirstConnection as the next figure shows. Reliable, very fast and easy to use database server. From the MySQL Workbench home screen shown in the previous figure, click the + icon near the MySQL Connections label to open the Setup New Connection wizard.Open-source relational database management systems.MySQL is a open-source, free and very popular relational database management system which is developed, distributed and supported by Oracle corporation. The editor shows sample boilerplate code when you choose language as 'MySQL' and start writing queries to learn and test online without worrying about tedious process of installation. Getting started with the OneCompiler's MySQL editor is really simple and pretty fast. It's one of the robust, feature-rich online editor and compiler for MySQL. In short, we saw how our Support Techs connect MySQL Workbench to EC2 Instance.Write, Run & Share MySQL queries online using OneCompiler's MySQL online editor and compiler for free. Once we configure the connection, we can connect to the private RDS DB instance using an SSH tunnel. After the test is successful, we select OK to save the connection. For Password, we enter the MySQL user password.ġ1. Then, for Username, we enter the user name that we use to connect to the database.ġ0. Similarly, for the MySQL Server Port, we enter the port number that we use to connect to the database.ĩ. For MySQL Hostname, we enter the database endpoint name.Ĩ. pem file used to connect from the file system.ħ. And for SSH Username, we enter the default SSH user name to connect to the EC2 instance.Ħ. After that, for SSH Hostname, we enter the public IP address of the EC2 instance.ĥ. Here we can select the Connection Method and Standard TCP/IP over SSH.Ĥ. Then we select MySQL New Connection and enter a connection name.ģ. Initially, we open the MySQL Workbench.Ģ. Moving ahead, let us see how our Support Techs perform this query.ġ. In addition, we need to confirm that the EC2 instance can connect to the internet using its public IP address from the local machine. Prior to connecting, we need to configure the security group inbound rules, network ACLs, and route tables to allow a connection between the EC2 instance and the RDS DB instance. Here, at Bobcares, we assist our customers with several AWS queries as part of our AWS Support Services. Recently, one of our customers wanted to connect MySQL Workbench to EC2 Instance.