Compute Instance
You cannot connect directly from a remote IP to the endpoint of a DB system. Use SSH or RDP to connect to a compute instance, and from the compute instance use MySQL Shell, MySQL Client or MySQL Workbench to connect to the DB system.
Connecting to a Compute Instance
Use SSH or RDP, depending on the platform, to connect to a compute instance.
Using the CLI
Use the command-line interface to connect to a compute instance.
- A running VCN with internet connectivity. See Creating a Virtual Cloud Network.
- A running MySQL DB system attached to the VCN. Note the IP address of the MySQL endpoint in the DB system, and the administrator username and password. To find the IP Address, see Endpoints.
- A running compute instance (Oracle Linux is used in the task) attached to a public subnet on the same VCN as the MySQL DB system. Note the public IP address of the compute instance. The SSH port, 22, is added to the public subnet by default. It is recommended you add an ingress rule for port 33060, which is the default port for MySQL Shell. If that port is not available, MySQL Shell connects to port 3306. If you have configured alternative ports, include the port number in your connection string. See Overview of Networking.
Related Topics
Connecting to a DB System
Use MySQL Shell, MySQL Client, or MySQL Workbench from a compute instance to connect to a DB system.
Using MySQL Shell
Use MySQL Shell on a compute instance to connect to the endpoint of the DB system.
- A running VCN with internet connectivity. See Creating a Virtual Cloud Network.
- A running MySQL DB system attached to the VCN. Note the IP address of the MySQL endpoint in the DB system, and the administrator username and password. To find the IP Address, see Endpoints.
- A running and connected compute instance (Oracle Linux is used in the task) attached to a public subnet on the same VCN as the MySQL DB system. Note the public IP address of the compute instance. The SSH port, 22, is added to the public subnet by default. It is recommended you add an ingress rule for port 33060, which is the default port for MySQL Shell. If that port is not available, MySQL Shell connects to port 3306. If you have configured alternative ports, include the port number in your connection string. See Overview of Networking.
- The MySQL Yum repository must be added and configured on your compute instance. Use the following command to install the release package directly from the MySQL download site:
sudo yum install https://dev.mysql.com/get/<repository-setup-package>Replace <repository-setup-package> with the repository setup package filename for your operating system. For example,
To view the available release packages, see MySQL Yum Repository. For more information, see Installing MySQL Shell on Linux.mysql97-community-release-el9-1.noarch.rpmfor Oracle Linux 9.
Using MySQL Client
Use MySQL Client on a compute instance to connect to the endpoint of the DB system.
- A running VCN with internet connectivity. See Creating a Virtual Cloud Network.
- A running MySQL DB system attached to the VCN. Note the IP address of the MySQL endpoint in the DB system, and the administrator username and password. To find the IP Address, see Endpoints.
- A running and connected compute instance (Oracle Linux is used in the task) attached to a public subnet on the same VCN as the MySQL DB system. Note the public IP address of the compute instance. The SSH port, 22, is added to the public subnet by default. See Overview of Networking.
Using MySQL Workbench
Use MySQL Workbench to connect to a DB system through an SSH tunnel on a compute instance.
- A running VCN with internet connectivity. See Creating a Virtual Cloud Network.
- A running compute instance (Oracle Linux is used in the task) attached to a public subnet on the same VCN as the MySQL DB system. Note the public IP address of the compute instance. See Overview of Networking.
- An SSH key pair.
Note
MySQL Workbench does not support PuTTY-generated keys. If you use PuTTYgen to generate your SSH key pair, convert your private key to the OpenSSH format using the Conversion utility of PuTTYgen.
- For MySQL Workbench 26:
- For MySQL Workbench 8.0: