当前位置:网站首页>Export MySQL table data in pure mode
Export MySQL table data in pure mode
2022-07-06 22:27:00 【Maple Leaf pear flower】
Sometimes I want to guide my watch , Is to export the data of a table , Then import to another table , But directly mysqldump
The table data exported by this command , Not clean enough , Can't import directly , So use some parameters to filter information . The following statement can export data cleanly
mysqldump -uroot -h 127.0.0.1 -proot --databases test --tables user_info --where "id > 3" --default-character-set gbk --skip-comments --no-create-info --no-create-db --skip-add-drop-table --skip-add-locks --skip-disable-keys --skip-extended-insert --set-gtid-purged=off -c > C:\Users\Breeze\Desktop\test.sql
Data in the original table
Derived SQL File data
/*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */;
/*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */;
/*!40101 SET @[email protected]@COLLATION_CONNECTION */;
/*!40101 SET NAMES gbk */;
/*!40103 SET @[email protected]@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @[email protected]@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @[email protected]@SQL_NOTES, SQL_NOTES=0 */;
INSERT INTO `user_info` (`id`, `name`, `age`) VALUES (4,'Dave',24);
INSERT INTO `user_info` (`id`, `name`, `age`) VALUES (5,'Eva',24);
INSERT INTO `user_info` (`id`, `name`, `age`) VALUES (6,'Maybe',27);
/*!40103 SET [email protected]_TIME_ZONE */;
/*!40101 SET [email protected]_SQL_MODE */;
/*!40014 SET [email protected]_FOREIGN_KEY_CHECKS */;
/*!40014 SET [email protected]_UNIQUE_CHECKS */;
/*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
/*!40101 SET [email protected]_CHARACTER_SET_RESULTS */;
/*!40101 SET [email protected]_COLLATION_CONNECTION */;
/*!40111 SET [email protected]_SQL_NOTES */;
Aforementioned SQL The file is relatively clean SQL Script statements
--default-character-set gbk
Set the encoding set , Prevent Chinese data from being garbled--skip-comments
Uncomment information--no-create-info
Export data only , Do not export table creation statements--no-create-db
Export data only , Do not export database creation statements--skip-add-drop-table
skipdrop
sentence-skip-add-locks
Cancel adding... Before each table exportLOCK TABLES
--skip-disable-keys
Export less output information ( For debugging ). Get rid of the comments and the head and tail structures . Options available :--skip-add-drop-table --skip-add-locks --skip-comments --skip-disable-keys
--skip-extended-insert
Use with multiple VALUES Column INSERT grammar .
边栏推荐
- 【sdx62】WCN685X将bdwlan.bin和bdwlan.txt相互转化操作方法
- 在IPv6中 链路本地地址的优势
- Mysql database basic operations DML
- NetXpert XG2帮您解决“布线安装与维护”难题
- 做接口测试都测什么?有哪些通用测试点?
- PVL EDI project case
- 中国固态氧化物燃料电池技术进展与发展前景报告(2022版)
- How does the uni admin basic framework close the creation of super administrator entries?
- MySQL数据库基本操作-DML
- Unity3d minigame unity webgl transform plug-in converts wechat games to use dlopen, you need to use embedded 's problem
猜你喜欢
Aardio - 利用customPlus库+plus构造一个多按钮组件
NPDP certification | how do product managers communicate across functions / teams?
Wechat red envelope cover applet source code - background independent version - source code with evaluation points function
pytorch_YOLOX剪枝【附代码】
(十八)LCD1602实验
基于 QEMUv8 搭建 OP-TEE 开发环境
Seata aggregates at, TCC, Saga and XA transaction modes to create a one-stop distributed transaction solution
将MySQL的表数据纯净方式导出
【数字IC手撕代码】Verilog无毛刺时钟切换电路|题目|原理|设计|仿真
剪映+json解析将视频中的声音转换成文本
随机推荐
SQL Server生成自增序号
Management background --2 Classification list
How does the uni admin basic framework close the creation of super administrator entries?
lora同步字设置
GPS from getting started to giving up (12), Doppler constant speed
414. The third largest digital buckle
重磅新闻 | Softing FG-200获得中国3C防爆认证 为客户现场测试提供安全保障
二分图判定
[10:00 public class]: basis and practice of video quality evaluation
Assembly and interface technology experiment 5-8259 interrupt experiment
AI enterprise multi cloud storage architecture practice | Shenzhen potential technology sharing
Anaconda installs third-party packages
return 关键字
微信红包封面小程序源码-后台独立版-带测评积分功能源码
空结构体多大?
GPS from getting started to giving up (XI), differential GPS
Oracle control file and log file management
2022-07-05 stonedb的子查询处理解析耗时分析
Management background --3, modify classification
CCNA Cisco network EIGRP protocol