MySQL远程带条件导出数据

MySQL远程带条件导出数据

>>mysqldump -h [host] -P [port] -u [username] -p[passwd] [dbname] [tablename] --where="create_time>='2017-07-01' and is_current=1" --skip-lock-tables>dbname.sql

远程查询结果导出到本地(query.sql为查询语句):

>>mysql -h [host] -P [port] -u [username] -p[passwd] [dbname]result.txt

你可能感兴趣的:(MySQL远程带条件导出数据)