当前位置:网站首页>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 .
边栏推荐
- 手写ABA遇到的坑
- 将MySQL的表数据纯净方式导出
- NPDP认证|产品经理如何跨职能/跨团队沟通?
- 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
- Daily question 1: force deduction: 225: realize stack with queue
- Unity3d minigame unity webgl transform plug-in converts wechat games to use dlopen, you need to use embedded 's problem
- SQL Server生成自增序号
- [sdx62] wcn685x will bdwlan Bin and bdwlan Txt mutual conversion operation method
- Installation and use of labelimg
- 2022-07-04 mysql的高性能数据库引擎stonedb在centos7.9编译及运行
猜你喜欢
Assembly and Interface Technology Experiment 6 - ADDA conversion experiment, AD acquisition system in interrupt mode
C#實現水晶報錶綁定數據並實現打印4-條形碼
Web APIs DOM time object
Chapter 4: talk about class loader again
NPDP certification | how do product managers communicate across functions / teams?
2021 geometry deep learning master Michael Bronstein long article analysis
Spatial domain and frequency domain image compression of images
【数字IC手撕代码】Verilog无毛刺时钟切换电路|题目|原理|设计|仿真
[sciter]: encapsulate the notification bar component based on sciter
Barcodex (ActiveX print control) v5.3.0.80 free version
随机推荐
第4章:再谈类的加载器
Attack and defense world ditf Misc
Aardio - 利用customPlus库+plus构造一个多按钮组件
pytorch_YOLOX剪枝【附代码】
AI enterprise multi cloud storage architecture practice | Shenzhen potential technology sharing
Notes de développement du matériel (10): flux de base du développement du matériel, fabrication d'un module USB à RS232 (9): création de la Bibliothèque d'emballage ch340g / max232 SOP - 16 et Associa
Aardio - 通过变量名将变量值整合到一串文本中
Installation and use of labelimg
在IPv6中 链路本地地址的优势
中国VOCs催化剂行业研究与投资战略报告(2022版)
2021 geometry deep learning master Michael Bronstein long article analysis
Crawler obtains real estate data
Senior soft test (Information System Project Manager) high frequency test site: project quality management
Web APIs DOM 时间对象
How does the uni admin basic framework close the creation of super administrator entries?
Assembly and Interface Technology Experiment 6 - ADDA conversion experiment, AD acquisition system in interrupt mode
空结构体多大?
zabbix 代理服务器 与 zabbix-snmp 监控
[10:00 public class]: basis and practice of video quality evaluation
3DMax指定面贴图