Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem

How can I This guide outlines the steps required to securely connect to a Spinup MySQL database ?

...

in Spinup Spaces.

  1. Setting Up the Firewall:
    Ensure that port 3306 is open on your Space Firewall. For

...

  1. guidance,

...

  1. see How to Configure the Firewall in Spinup Spaces

...

  1. .

  2. Choosing a MySQL Client:
    There are various clients available to connect to a MySQL database. For a comprehensive list, click here. For initial connection testing, we recommend using the official mysql client

...

  1. via the command line.

  2. Establishing the Connection:

...

  1. On a machine with the mysql client installed,

...

  1. execute the following command:

bash
Code Block
language
mysql -u [USERNAME] -p -h [DATABASEURL]

Example:

bash
Code Block
language
#Example
mysql -u db01 -p -h spinuph spinup-mysql-01.c9ukc6s0rmbg.us-east-1.rds.amazonaws.com

Post login, select the required databaseAfter logging in, choose your desired database with the use command:

Code Block
languagebash
use db01
Info

Always ensure you connect to the database using with SSL encryption. While the mysql client enables this SSL by default, some application connections might require may need manual activationsetup.

...


Connecting to Secure Spinup Spaces

...

via SSH Tunneling

Secure For Spinup spaces , especially those containing that hold moderate or high-risk data , allow with limited port access. Direct database connection from outside , you might not be able to directly connect from external devices like laptops is restricted. However, an An SSH tunnel can bridge this gaphelp:

1. Establish the SSH tunnelTunnel:

bash
Code Block
language
ssh -L 3307:spinup-db000b68.cluster-cyynsscieqtk.us-east-1.rds.amazonaws.com:3306 spinup3306 spinup-000b65.spinup.yale.edu

In a separate terminal, leverage 2. Connect Using the Tunnel:
Open a new terminal and use the following command to connect through the established tunnel to connect: 

bash
Code Block
language
mysql -h 127.0.0.1 -P 3307 -u root -p

This will use the local port 3307 to connect command connects to the database instance at at spinup-db000b68.cluster-cyynsscieqtk.us-east-1.rds.amazonaws.com  via the server  spinup spinup-000b65.spinup.yale.edu, using the local port 3307.

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "database" and space = "spinup"

...