TDSQL-C for MySQL supports data migration through a command line tool.
mysqldumpin the following way:
The data files exported by using
mysqldumpmust be compatible with the SQL specification of your purchased TDSQL-C for MySQL database. You can log in to the database and get the MySQL version information by running the
select version();command. The name of the generated SQL file can contain letters, digits, and underscores but not "test".
shell > mysqldump [options] db_name [tbl_name ...] > bak_pathname
options is the export option,
db_name is the database name,
tbl_name is the table name, and
bak_pathname is the export path.
For more information on how to export data with mysqldump, see mysqldump — A Database Backup Program.
2. A database can be restored with the MySQL command line tool by running the following command:
shell > mysql -h hostname -P port -u username -p < bak_pathname
hostname is the target server for data restoration,
port is the port of target server,
username is the username of the database on the target server, and
bak_pathname is the full path to the backup file.
Make sure that the same source and target database versions, mysqldump tool versions, and source and target database character sets are used. You can specify the character set using the parameter
For more information on how to access a database on a CVM instance, see Connecting to Cluster via the Console.
db_blogdatabase in TencentDB for example, log in to the CVM instance and generate the SQL file to be imported with the MySQL command line tool "mysqldump".
For more information, see the character set description in Use Limits.
Contact our sales team or business advisors to help your business.
Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.
Was this page helpful?