Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MongoDB daily operation and maintenance-07 remotely export data to execl

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

MongoDB Daily Operation and Maintenance-07 Remote Export Data to execl

Environmental Description:

MongoDB Server OS: Centos 6.5

MongoDB Client OS: Windows 7

MongoDB Version: 3.4

The method is as follows:

Remote export of required data to client computer via client (windows 7) mongoexport tool.

Statement:

mongoexport.exe --csv --host 192.100.100.10:27017 /d cjcdb /c t1 /f "_id,userName,account,createTime,content" /q "{"delete": false}" /o C:\Users\Administrator\Desktop\t1_20200312a.csv

Statement Description:

The client uses mongoexport tool to connect to the 27017 instance cjcdb database t1 table on the 192.100.100.10 server and export all_id,userName,account,createTime,content field data that meets the "delete": false condition to the desktop t1_20200312a.csv text.

Question:

Export table data, view data garbled

Solve the garbled code:

---Open mode (Notepad)---Format--Font---Chinese GB2312--Save---csv mode Open---Adjust format--Save as execl format file

Welcome to pay attention to my Weixin Official Accounts "IT Little Chen," learn together and grow together!!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report