Let’s now see how we can connect to our MySQL HeatWave DB System, which was deployed with the OCI Hackathon Starter Kit in part 1.
We have multiple possibilities to connect to the DB System, and we will use three of them:
- using MySQL Shell in the command line via the compute instance
- using MySQL Shell for Visual Studio Code on your development machine
- using Cloud Shell
MySQL Shell in the command line
MySQL Shell is already installed on the Compute Instance. Sometimes, if it’s not installed automatically, it’s because the selected compute shape is too small. This was the case with the always-free
VM.Standard.E2.1.Micro shape. This is fixed in the last version of the stack.
From the deployed compute instance, when SSH-connected, you can launch MySQL Shell and connect to the MySQL HeatWave DBSystem using its private IP.


Let’s see all this in video:
MySQL Shell for Visual Studio Code
If we configure the OCI config on our machine, we can use MySQL for Visual Studio Code to connect to the MySQL HeatWave DBSystem via a bastion host.
We need to create or update our ~/.oci/config file to use a new API Key for our user.
OCI Console’s Cloud Shell
You can also use the Cloud Shell from the OCI Console to connect to your MySQL HeatWave DBSystem.
You need first to use an “Ephemeral private network” that uses your VCN and your private subnet:
Then you connect using the DBSystem’s private IP, like in the video:
Conclusion
We saw how to connect to the MySQL HeatWave Database instance using MySQL Shell. Now we can create databases, tables, and more.
In the following article, we will see how to connect from our programming language.
