Data Management Service (DMS) is an all-in-one data management service provided by Alibaba Cloud that offers data management, schema management, user authorization, security auditing, data trending, and data tracing. This service helps you secure data, improve management efficiency, and gain clearer data insights. This topic describes how to log on to a database by using the web version of DMS.
You cannot use the web version of DMS to log on to databases on expired Web Hosting instances.
Procedure
This topic provides an example of logging on to a Web Hosting instance with your Alibaba Cloud account and password. If you forget your Alibaba Cloud account or password, see What do I do if I forget my member name or logon password?.
- Log on to the Cloud Web Hosting management page.
- Find the Cloud Web Hosting instance that you want to manage and click Manage in the Actions column.
-
In the left-side navigation pane, click Database information.
-
On the Database information page, find the information required for logging on with the web version of DMS.
This example is for a Linux-based Web Hosting instance accessed with an Alibaba Cloud account. In this case, the MySQL database version is displayed. You can obtain information such as the database name, database endpoint, and database username. This page lists the information for created databases in a table.
-
Click Manage in the Actions column for the database.
NoteIf you log on to the Web Hosting instance by using your console account and password, on the Database information page, click Download DMS Client in the Actions column for the database to open the DMS page.
-
In the Log on to instance dialog box, configure the parameters and click Log On.
The following table describes the parameters.
Parameter
Description
Database type
The type of the database instance, such as MySQL or SQL Server. You can keep the default value.
Instance region
The region where the Web Hosting instance is located, for example, China (Beijing). You can keep the default value.
Database endpoint
The database endpoint of the Web Hosting instance. You can keep the default value.
For information about how to obtain the database endpoint, see Step 4.
Port
You can keep the default value. Valid values:
-
3306: the port for MySQL databases.
-
1433: the port for SQL Server databases.
Database account
The database username for your Web Hosting instance.
For information about how to obtain the database username, see Step 4.
Database password
The database password for your Web Hosting instance.
If you forget the password, you can reset it. For more information, see Reset the database password for a Web Hosting instance.
NoteThe control mode for the database instance defaults to the Flexible mode. This mode is free of charge and does not limit operations. For more information, see Control modes.
-
-
In the left-side navigation pane, choose .
On the Logged-in instance tab, you can view the database instances that you have logged on to. For example, the database instance (bdm70078****.my3w.com:3306) is successfully registered in DMS.
NoteDatabase instances can be in one of three states: not logged in, logon-free, or logged in.
-
Find the logged-on database and use one of the following methods to access it.
-
Method 1: Double-click the database name, for example, bdm70078****_db.
-
Method 2: Right-click the database name, for example, bdm70078****_db, and then click Query.
After you log on to the database, you are automatically redirected to the SQLConsole page. You can perform operations such as importing data, exporting the database, creating tables, and deleting tables. The left pane displays the database directory tree and the Table tab. The right pane is the SQL editing and query area.
NoteThis topic uses a MySQL database as an example. The actual interface may vary based on your database type.
-
Next steps
After you log on to the database, you can create and delete tables, import data, and export the database.
-
Create a table: On the SQLConsole page, create a new table on the Table tab.
-
If one or more tables already exist in the database: To create another table, right-click a blank area on the Table tab and click Create table.
Configure the Basic information, column information, index information, and foreign key information for the table. For more information, see Create a table.
-
If no tables exist in the database: Click here on the Table tab to go to the Create table page and configure the parameters.
Configure the Basic information, column information, index information, and foreign key information for the table. For more information, see Create a table.
-
-
View table sizes in a database
If your database is low on space, view the sizes of all tables and delete any abnormal or unneeded ones to free up space.
ImportantDue to permission restrictions, you cannot view the table sizes for SQL Server databases. This operation is supported only for MySQL databases.
In the editor of the SQLConsole page, enter the following commands and click Execute.
use <your_database_name>; SELECT TABLE_NAME,DATA_LENGTH+INDEX_LENGTH,TABLE_ROWS FROM TABLES WHERE TABLE_SCHEMA='<your_database_name>'NoteReplace <your_database_name> in the preceding code with the actual name of your database, for example, bdm70078****_db. For information about how to obtain the database name, see Obtain and configure database information.
After the commands are successfully executed, the query results display the TABLE_NAME (table name), DATA_LENGTH+INDEX_LENGTH (data size), and TABLE_ROWS (number of rows) for each table.
-
Delete a table
On the Table tab of the SQLConsole page, find the table that you want to delete. Right-click the table and choose . Then, on the Submit change page, click Submit for execution.
-
Import data
On the Table tab of the SQLConsole page, right-click an existing table and click Import. Then, on the Data import page, configure the parameters. For more information about the parameters, see Import data.
-
Export a database
On the Table tab of the SQLConsole page, right-click an existing table and choose . Then, on the Database export page, configure the parameters. For more information about the parameters, see Export data.
NoteFrom the Table tab, you can also Export this table, Export table creation statement, and Export table schema.