Importing SQL Files

Last updated: 2023-09-04 10:30:38

Scenario

TencentDB for MySQL supports importing SQL files in the console. This feature allows you to execute SQL statements in the selected database. You can also use this feature to create databases/tables and change table structure so as to initialize or modify the instance.
Note
Only two-node and three-node TencentDB for MySQL instances support importing SQL files.

Instructions

1. Log in to the TencentDB for MySQL console. In the instance list, click an instance ID or Manage in the Operation column to enter the instance management page.
2. On the instance management page, select Database Management > Database List and click Data Import.


3. In the pop-up window, click Add File to import the file. After the upload is completed, click Next.
Note
To avoid database unavailability caused by corruption of system tables, do not import data from system tables such as the mysql.user table.
Only incremental import is supported. Clear any obsolete data in the database before importing.
You can import an unencrypted .zip file. The unzipped files must be .sql files with a total size of no more than 5 GB.
A single file should not exceed 10 GB (if it is zipped, the file should not exceed 5 GB after being unzipped), and the file name can contain only letters, digits, and underscores.
Uploaded files are valid for 14 days and will be automatically deleted after expiration.

4. On the target database selection page, select the target database and click Next.
5. On the confirmation page, verify that the data is correct, enter your account password, and click Import.
Note
The import cannot be rolled back. Please confirm the import information.
If you've forgotten your account password, please refer to Reset Password to change it.