Backup the specified sql data to a file

 

 

--Back up the specified sql data

--mysql -h127.0.0.1 -P7018 -utest -ptest -e "select distinct ct_task_id from tb_test where task_type = 1" cdc_dmap > cdc_dmap.txt

 

The solution for garbled characters, set the encoding: set names utf8;

--mysql -h127.0.0.1 -P7018 -utest -ptest -e "set names utf8;select distinct ct_task_id from tb_test where task_type = 1" cdc_dmap > cdc_dmap.txt

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326828669&siteId=291194637