SQL queries in Managed Service for MySQL
Managed Service for MySQL allows you to visualize the data structure in your cluster and send SQL queries to databases from the Yandex Cloud management console. To do this, log in to the management console
Warning
The SQL editor built into the management console is designed for a narrow range of data editing tasks. Some parameter values can be replaced by the editor's defaults.
For working with databases, we recommend third-party editors or Yandex WebSQL. To use Yandex WebSQL, click Open on a promo banner and connect to a DB cluster.
Access to the cluster from the management console
To connect to a Managed Service for MySQL cluster from the management console and operate its data, enable the Access from the management console option when creating a cluster or updating its settings.
Authentication
Every time you open the SQL tab, you must enter the cluster user's username and password and select the database to connect to. This will open the database structure and the SQL query input window.
Tip
To avoid having to enter your password too frequently, open this management console page in a new browser tab.
Data structure visualization
Once you are logged in, you can access the structure of the selected database and the database tables:
Click the table to see the first 1,000 rows of the SELECT *
query result for this table (the management console does not support full navigation of all the database data). To see the type of column data, hover over the column header.
To display the results table starting from a specific row, set the corresponding number in the Query result offset field. A maximum of 20 rows can be displayed on one page. Use the < and > buttons to quickly increase and decrease the number of the start row by 20.
SQL queries
The query input window is open on the right. Start typing your query to see suggested keywords. Finish the query and click Execute. The results table or an error message will show in the results panel under the buttons.
Query restrictions in the management console
The main query restriction in the management console is that the text of queries and their results are displayed until you close or reload the page in your browser. But if a query was run successfully, Managed Service for MySQL processes it regardless of the state of the management console.
In addition, keep the following in mind:
- The management console will only display the first 1000 rows of results, even if there is actually more data.
- When a cluster query takes more than 10 minutes to complete, the management console will report an error as a result, even if the query was eventually processed successfully.