当前位置:网站首页>MySQL带二进制的库表导出导入
MySQL带二进制的库表导出导入
2022-07-03 06:02:00 【UU_Yang】
【mysqldump】导出sql脚本,不能使用select导出部分字段
导出
>mysqldump -hlocalhost -P3307 -uroot -p123456 mydb mytable --where="id = 412123456" --hex-blob --add-drop-table=false --add-locks=false --no-create-info=true>"d:\export.sql"
导入
>mysql -hlocalhost -P3307 -uroot -p123456 mydb <export.sql
或者先mysql登录,切换DB,执行source export.sql
【sql】导出数据,可以使用select语句
select id, c1, c2, c3, c4, c5, c6, c7, c8 from mydb.mytable limit 100 into outfile
'C:/ProgramData/MySQL/MySQL Server 5.7/Uploads/out.csv' fields Terminated by',' lines terminated by'\r\n';
导入
load data infile 'C:/ProgramData/MySQL/MySQL Server 5.7/Uploads/out.csv' into table mydb.mytable
【mysql】导出数据,可以使用select
mysql -h192.168.1.12 -P3307 -uroot -p123456 test -e "select id,name,age from usertable" > d:\users.csv
边栏推荐
- Solve the problem of automatic disconnection of SecureCRT timeout connection
- Understand expectations (mean / estimate) and variances
- pytorch 多分类中的损失函数
- Loss function in pytorch multi classification
- Detailed explanation of findloadedclass
- pytorch DataLoader实现miniBatch(未完成)
- Common exceptions when Jenkins is released (continuous update...)
- CAD插件的安装和自动加载dll、arx
- Deep learning, thinking from one dimensional input to multi-dimensional feature input
- Capacity expansion mechanism of map
猜你喜欢
Simple solution of small up main lottery in station B
Core principles and source code analysis of disruptor
CKA certification notes - CKA certification experience post
@Import annotation: four ways to import configuration classes & source code analysis
Understand one-way hash function
The most responsible command line beautification tutorial
Synthetic keyword and NBAC mechanism
[branch and cycle] | | super long detailed explanation + code analysis + a trick game
Exception when introducing redistemplate: noclassdeffounderror: com/fasterxml/jackson/core/jsonprocessingexception
Multithreading and high concurrency (7) -- from reentrantlock to AQS source code (20000 words, one understanding AQS)
随机推荐
How to create and configure ZABBIX
从小数据量 MySQL 迁移数据到 TiDB
Jedis source code analysis (II): jediscluster module source code analysis
pytorch 多分类中的损失函数
1. 两数之和
Crontab command usage
AtCoder Beginner Contest 258(A-D)
[teacher Zhao Yuqiang] index in mongodb (Part 1)
Yum is too slow to bear? That's because you didn't do it
Leetcode solution - 01 Two Sum
Beandefinitionregistrypostprocessor
[Zhao Yuqiang] deploy kubernetes cluster with binary package
C 语言文件操作函数大全 (超详细)
88. Merge two ordered arrays
Synthetic keyword and NBAC mechanism
Use telnet to check whether the port corresponding to the IP is open
Strategy pattern: encapsulate changes and respond flexibly to changes in requirements
Pytorch dataloader implements minibatch (incomplete)
Clickhouse learning notes (I): Clickhouse installation, data type, table engine, SQL operation
Redhat7 system root user password cracking