内容简介:官方文档:步骤:接收方:nc -l 192.168.16.29 1234 > test.sql
通过cpimport传输迁移:
官方文档: https://mariadb.com/kb/en/lib...
步骤:
1.导出库中表的表结构,不要数据
# mysqldump -h 127.0.0.1 -uroot -p -P 4066 --skip-lock-tables test -d > test.sql
2.nc将文件传输至目标机器192.168.16.29
接收方:nc -l 192.168.16.29 1234 > test.sql
发送方:nc 192.168.16.29 1234 < test.sql
3.将test.sql文件导入到192.168.16.29的columnstore库中
4.使用cpimport导入数据
在192.168.16.29上面执行:
官方命令为: # mcsmysql -q -e 'select * from source_table;' -N <source-db> | /usr/local/mariadb/columnstore/cpimport -s '\t' <target-db> <target-table>
具体为:(在目标机器10.65.16.29机器上执行)
# mcsmysql -h 192.168.16.14 -uroot -p -P 4066 -q -e 'select * from new_users;' -N 'test' | cpimport -s '\t' -n 1 'test' 'new_users'
说明: -N 删除非数据格式。 -q 告诉 mysql 客户端不要缓存结果,这会避免可能的超时导致负载失败 cpimport语法说明: -n NullOption(0-将字符串NULL视为数据(默认); 1 .将字符串NULL视为空值) -s 'c'是列值之间的分隔符 -m 模式(默认为1) 1 - 行将以分布式的方式跨PMs加载。 2 - PM基于输入文件加载到各自的PM。 3 - 输入文件将加载到本地PM。
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
The Creative Curve
Allen Gannett / Knopf Doubleday Publishing Group / 2018-6-12
Big data entrepreneur Allen Gannett overturns the mythology around creative genius, and reveals the science and secrets behind achieving breakout commercial success in any field. We have been s......一起来看看 《The Creative Curve》 这本书的介绍吧!