当前位置:网站首页>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 gbkSet the encoding set , Prevent Chinese data from being garbled--skip-commentsUncomment information--no-create-infoExport data only , Do not export table creation statements--no-create-dbExport data only , Do not export database creation statements--skip-add-drop-tableskipdropsentence-skip-add-locksCancel adding... Before each table exportLOCK TABLES--skip-disable-keysExport 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-insertUse with multiple VALUES Column INSERT grammar .
边栏推荐
- labelimg的安装与使用
- Lora sync word settings
- i.mx6ull搭建boa服务器详解及其中遇到的一些问题
- 十二、启动流程
- MySQL约束的分类、作用及用法
- Wechat red envelope cover applet source code - background independent version - source code with evaluation points function
- 新手程序员该不该背代码?
- Insert sort and Hill sort
- ResNet-RS:谷歌领衔调优ResNet,性能全面超越EfficientNet系列 | 2021 arxiv
- AI enterprise multi cloud storage architecture practice | Shenzhen potential technology sharing
猜你喜欢

二叉(搜索)树的最近公共祖先 ●●

硬件開發筆記(十): 硬件開發基本流程,制作一個USB轉RS232的模塊(九):創建CH340G/MAX232封裝庫sop-16並關聯原理圖元器件

A Mexican airliner bound for the United States was struck by lightning after taking off and then returned safely

小常识:保险中的“保全”是什么?

LeetCode刷题(十一)——顺序刷题51至55

labelimg的安装与使用

That's why you can't understand recursion

0 basic learning C language - interrupt
![pytorch_ Yolox pruning [with code]](/img/98/31d6258635ce48ac53819d0ca12d1d.jpg)
pytorch_ Yolox pruning [with code]
![[leetcode daily clock in] 1020 Number of enclaves](/img/2d/3d12f20c8c73fb28044c01be633c99.jpg)
[leetcode daily clock in] 1020 Number of enclaves
随机推荐
【数字IC手撕代码】Verilog无毛刺时钟切换电路|题目|原理|设计|仿真
That's why you can't understand recursion
qt quick项目offscreen模式下崩溃的问题处理
Mysql database basic operations DML
return 关键字
Embedded common computing artifact excel, welcome to recommend skills to keep the document constantly updated and provide convenience for others
Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
二分图判定
C # realizes crystal report binding data and printing 4-bar code
[线性代数] 1.3 n阶行列式
枚举与#define 宏的区别
Aardio - 利用customPlus库+plus构造一个多按钮组件
Netxpert xg2 helps you solve the problem of "Cabling installation and maintenance"
硬件開發筆記(十): 硬件開發基本流程,制作一個USB轉RS232的模塊(九):創建CH340G/MAX232封裝庫sop-16並關聯原理圖元器件
ResNet-RS:谷歌领衔调优ResNet,性能全面超越EfficientNet系列 | 2021 arxiv
C#實現水晶報錶綁定數據並實現打印4-條形碼
i. Mx6ull build boa server details and some of the problems encountered
Research and investment strategy report of China's VOCs catalyst industry (2022 Edition)
volatile关键字
微信红包封面小程序源码-后台独立版-带测评积分功能源码