Getting started with Managed Service for MySQL®
To get started with the service:
Getting started
-
Go to the management console
and log in to Nebius AI or create an account if you do not have one yet. -
You can connect to DB clusters from both inside and outside Nebius AI:
- To connect to a DB cluster from inside Nebius AI, create a VM in the same cloud network as the DB cluster (with Linux).
- To connect to the Managed Service for MySQL cluster from the internet, request public access to hosts when creating the cluster.
Note
The next step assumes that you are connecting to the Managed Service for MySQL cluster from a Linux-based VM.
-
Connect to the VM via SSH.
-
Install the required dependencies and the MySQL client:
sudo apt update && sudo apt install -y mysql-client
Create a cluster
- In the management console, select the folder where you want to create a DB cluster.
- Select Managed Service for MySQL.
- Click Create cluster.
- Set the Managed Service for MySQL cluster parameters and click Create cluster. This process is described in detail in Creating MySQL clusters.
- Wait until the Managed Service for MySQL cluster is ready: its status on the Managed Service for MySQL dashboard will change to Running and its state to Alive. This may take some time.
Connect to the DB
-
To connect to the DB server, get an SSL certificate:
Linux (Bash) and macOS (Zsh)Windows (PowerShell)mkdir -p ~/.mysql && \ wget "https://storage.nemax.nebius.cloud/certs/CA.pem" \ --output-document ~/.mysql/root.crt && \ chmod 0600 ~/.mysql/root.crt
The certificate is saved to the
~/.mysql/root.crt
file.mkdir $HOME\.mysql; curl.exe -o $HOME\.mysql\root.crt https://storage.nemax.nebius.cloud/certs/CA.pem
The certificate is saved to the
$HOME\.mysql\root.crt
file. -
Use the
mysql
command to connect:mysql --host=<MySQL host name>.mdb.nemax.nebius.cloud \ --port=3306 \ --ssl-ca=~/.mysql/root.crt \ --ssl-mode=VERIFY_IDENTITY \ --user=<username> \ --password \ <DB name>
What's next
- Read about service concepts.
- Learn more about creating a Managed Service for MySQL cluster and connecting to the database.
- Read questions and answers.