Managing database connections
- Connecting to a database cluster in Yandex Cloud
- Connecting to an external database
- Adding a connection to a connection group
- Renaming a connection group
- Viewing connection settings
- Viewing information about a table
- Viewing information about a view
- Viewing information about a schema
- Reconnecting to databases and clusters
- Deleting a connection
- Managing demo connections
Note
This feature is in the Preview stage.
In Yandex WebSQL
- Add connections to databases or database clusters.
- Check connection settings.
- Re-establish previously created connections.
- Delete connections that you no longer need.
- Work with demo connections to explore Yandex WebSQL.
Connecting to a database cluster in Yandex Cloud
If you have a PostgreSQL, ClickHouse®, or MySQL cluster configured in Yandex Cloud, you can connect directly to it:
Warning
You can establish connections to managed DB clusters from your Yandex Cloud organization's clouds and folders. If you switch to a different organization, a set of clusters from other clouds and folders will be available to you.
- Make sure the Access from the management console option is enabled in the PostgreSQL, MySQL, or ClickHouse® cluster settings.
- In Yandex WebSQL, go to the Connection manager section and click
in the top-right corner. - Specify the connection parameters:
- Cloud: Select a cloud.
- Folder: Select the folder where you created the database cluster.
- Cluster: Select the cluster.
- Click Connect to connect to the selected cluster.
Imported connections will be available while you are working in the current Yandex Cloud organization.
Connecting to an external database
- Go to the Connection manager (
) section and click in the top-right corner. - Click External connection.
- Specify the connection parameters:
- Database type: Select PostgreSQL, ClickHouse®, or MySQL.
- Database URL: Specify the DB host address in
https://<address>
format. - Port: Specify the number of the port for connections.
- Database: Enter the DB name.
- User and Password: Enter the username and password to access the database.
- SSL certificate: Enable this option if your cluster uses a secure SSL connection. The Yandex WebSQL certificate is used by default.
- Click Connect.
Adding a connection to a connection group
The databases belonging to the same cluster are displayed in the connections tree as connection groups. In the connection settings, such databases will have the same URL and port number.
To add a connection to a group:
- Select a group in the connections tree.
- Click ... to the right of the group name and select Add connection.
- In the window that opens, you will see the preconfigured settings for the cluster connection. You can specify the database name as well as the username and password for access to it.
- Click Connect.
Renaming a connection group
To rename a connection group:
- Select a group in the connections tree.
- Click ... to the right of the group name and choose Rename group.
- In the window that opens, specify a new group name and click Apply.
Viewing connection settings
To view connection settings:
- Select a connection or a connection group.
- Click ... to the right of the connection name and choose Connection information.
A panel with connection settings will open.
There are groups of tables and views (VIEW
) within a single connection.
Viewing information about a table
To view detailed information about a table and its columns:
- Select the connection and database.
- In the Tables group, select a table.
- To the right of the table name, click
and select Table information.
This opens a panel with information about the table, including its name, size, and an approximate number of table rows. You can also get the following information about table columns:
- Column name.
- Data type.
- Whether the column is Nullable.
- Whether the column is a primary key.
If the table contains indexes or triggers, the same panel will display information about columns and indexing types, as well as trigger events.
Viewing information about a view
To see detailed information about a view:
- Select the connection and database.
- In the Views group, select the view.
- To the right of the view name, click
and select View overview.
A panel will open showing information about the view name and its columns:
- Column name.
- Data type.
- Whether or not the column is nullable.
Viewing information about a schema
To see detailed information about a database schema:
- Select the connection and database.
- Select the schema.
- To the right of the schema name, click
and select Schema information.
A panel will open with information about the schema type and its sequences, if any.
Reconnecting to databases and clusters
In the Connection manager, you can view the status of connections and refresh them or reconnect to databases and clusters. Active connections are marked in green, inactive connections are marked in red.
Tip
Use the search field on the Connection manager panel to find a connection with the appropriate database, table, or schema.
To refresh an active connection:
- Select an active connection.
- Click ... to the right of the connection name and choose Refresh connection.
This will update the entire hierarchy for this connection, including tables and views. If a table was deleted from a database, you will need to refresh the connection for the changes to appear in Yandex WebSQL.
To refresh all active connections, click
To re-establish inactive connections:
- Select an inactive connection.
- Click ... to the right of the connection name and choose Reconnect.
- Enter your username and password for database access and click Connect.
Deleting a connection
To delete the connections you no longer use:
- Select a connection or a connection group.
- Click ... to the right of their name and choose Delete connection or Delete group.
Managing demo connections
Demo connections are pre-established connections with test databases that allow you to explore the Yandex WebSQL features. Demo connections are added by default. You cannot delete or rename them, but you can hide them in the Connection manager panel:
- Click Settings (
) in the bottom-left corner. - Disable Show demo connections in the general settings.
ClickHouse® is a registered trademark of ClickHouse, Inc