Skip to Content
Dismiss
創新
專為 AI 打造的平台

整合式、自動化、可將資料轉化為高效情報。

深入了解
Dismiss
拉斯維加斯,6 月 16-18 日
Pure//Accelerate® 2026

探索如何完整釋放資料價值。 

立即報名

什麼是 mysqlpump?

什麼是 mysqlpump?

mysqlpump 公用程式與 MySQL 5.7 一同推出,是舊版本 mysqldump 公用程式的更快替代方案。雖然 mysqldump 的功能與 mysqldump 相似,但 mysqlpump 公用程式是用來使用並行方式備份大型資料庫,而舊型 mysqldump 公用程式則無法使用。它可以備份整個資料庫,也可以只備份幾個特定的物件。

什麼是 mysqlpump?

mysqlpump 於 MySQL 5.7 推出,是執行邏輯備份的用戶端公用程式,可產生一組 SQL 陳述式,並執行以還原原始資料庫物件。它透過支援平行處理和多執行緒,解決了 mysqldump 中緩慢備份的問題。部分資料庫包含 TB 的資料,因此將資料匯出至簡單的文字檔案可能會花費太長的時間。mysqlpump 公用程式同時使用多個執行緒,以更快的速度將資料傳輸至文字檔案。因為 MySQL 資料庫開發人員在幾年前推出,近年來改善了 MySQL 資料庫,以提供更穩定的 mysqlpump 公用程式,並提供更多選項。即便速度更快,mysqlpump 公用程式在 mysqldump 中並未提供所有選項,因此只有在系統管理員需要快速匯出 MySQL 資料庫及其資料時,才會使用它。

如何安裝 mysqlpump

如果您使用 MySQL 5.7 或更新版本,就已經可以存取 mysqlpump。此公用程式隨附 MySQL 資料庫引擎,因此無需安裝。如果您有較舊版本的 MySQL,則無法使用 mysqlpump,但 mysqldump 是可行的替代方案。

無論您在 Windows 或 Linux 上使用 MySQL,MySQL 資料庫引擎都可以使用 mysqlpump 公用程式。您可以透過在 Windows 或 Linux 中開啟命令列公用程式,並用多種參數選項輸入 “mysqlpump” 來自訂公用程式匯出資料的方式。

mysqlpump 的基本用途和範例

在您的伺服器上安裝 MySQL 後,您可以從命令列存取 mysqlpump。在 Windows 或 Linux 中開啟命令列,您可以使用以下命令匯出資料庫架構:

mysqlpump --all-databases --user=root --password > full_backup.sql

上述命令會將所有資料庫配置匯出至 full_backup.sql 檔案。您使用的使用者名稱和密碼必須能夠存取您要匯出的資料庫,因此使用 mysqlpump 公用程式時,請務必使用高權限帳戶。

如果您已經通過 MySQL 的驗證,您也可以傾印資料庫配置,而無需指定使用者名稱和密碼:

mysqlpump --all-databases > full_backup.sql

若您想要傾印單一資料庫,可以使用下列指令:

mysqlpump myDB

上述命令會將資料庫架構及其資料匯出至 myDB。您可以用空格字元分隔每個資料庫名稱,以匯出多個資料庫。

管理員偶爾可能只想匯出資料庫中的特定表格。使用 mysqlpump 傾印表格資料可以使用以下指令執行:

mysqlpump myDB Customer Order

在上述範例中,mysqlpump 對帳單會從 myDB 資料庫匯出客戶和訂單表格。請注意,表格名稱以空格字元分隔。

企業管理員使用差異化和增量備份,以避免每次都進行完整備份。差異備份包含自上次完整備份以來變更的所有資料。增量備份儲存自上次備份以來變更的所有資料,可以是增量備份或完整備份。mysqlpump 無法使用這兩種備份類型,因此公用程式只能用於完全或部分備份資料庫及其物件。

進階使用 mysqlpump

mysqlpump 公用程式提供一些進階使用選項。第一個是壓縮輸出。對於大型資料庫,使用壓縮輸出將減少儲存備份檔案所需的硬碟容量。它在企業級環境中特別有用,在企業級環境中,會儲存多個大型檔案,以在整個月進行完整備份。

使用 mysqlpump 時,您需要指定壓縮演算法。您可以使用 LZ4,這主要是用於速度。zlib 演算法較受使用 gzip 或 zlib 包裝程式的管理員歡迎。在此範例中,zlib 演算法用於輸出 gzip 檔案:

mysqlpump --compress --compress-output=zlib myDB > myDB_compressed.sql.gzip

為保持合規性,儲存的備份必須加密。靜態資料是指儲存在硬碟上的資料,當其為敏感的個人識別資訊 (PII)、財務資料,或屬於合規法規的任何資料時,必須加密。在此範例中,mysqlpump 指令被傳送並使用 OpenSSL 建立加密輸出:

mysqlpump --all-databases | openssl  enc -aes-256-cbc -k yourpassword > backup.xb.enc

mysqlpump 的一個方面是,它能夠並行傾印表格和資料庫,這意味著它可以使用多個電腦流程來匯出資料。將平行傾印視為同時進行多項匯出,而不是等待每個物件逐一完成。管理員使用並行處理加速備份程序。

若要在 mysqlpump 上使用平行處理,您必須定義匯出時使用的執行緒數量。預設值為二,但您可以定義更多。以下陳述使用四個執行緒,從 myDB 資料庫匯出兩個表格:客戶和訂單:

Mysqlpump -default-parallelism=4 myDB Customer Order > full_backup.sql

mysqlpump vs. mysqldump

mysqlpump 中的平行處理選項在 mysqldump 中不可用,因此管理員可以利用 mysqlpump 獲得更快的備份速度。mysqlpump 的優勢是在大型企業環境中加快備份速度。Mysqlpump 中的平行處理不需花費數分鐘進行備份,而是可以縮短資料備份至數分鐘的時間。

並非 mysqldump 中的每個選項都適用於較新的 mysqlpump,您至少必須安裝 MySQL 5.7 才能使用。匯入不會使用平行處理,因此您不具備匯入資料的速度優勢。管理員可以選擇使用其他公用程式來匯入資料。

結論

備份是資料庫管理的重要部分,而 mysqlpump 公用程式則讓流程更快。為快速備份整個資料庫或資料庫內的幾個物件,mysqlpump 會匯出架構和資料,將其加密和壓縮,並使用多個平行的執行緒。每當您需要建立資料庫的完整備份或匯出多個表格時,都可以使用它。

03/2026
Azure VMware Storage - Cut AVS Costs by 40% | Everpure
Reduce Azure VMware Solution costs by 40% with independently scalable storage. Enterprise-grade block storage managed directly from Azure portal.
解決方案簡介
5 頁

查看重要資訊與活動

商展
Pure//Accelerate® 2026
June 16-18, 2026 | Resorts World Las Vegas

準備好參加今年度為您帶來最大價值的活動了嗎?

立即報名
PURE360 示範
探索、認識、體驗 Everpure。

存取隨取隨用影片與示範,了解 Everpure 的強大功效。

觀賞示範影片
影片
觀看影片:企業級資料雲端的價值。

Charlie Giancarlo 討論管理為何管理資料才是未來趨勢,而非儲存設備。發掘整合式做法如何革新企業級 IT 作業。

立即觀看
資源
傳統儲存裝置無法驅動未來。

現代化工作負載需求必須達到 AI 級速度、安全性與規模。您的技術棧準備好了嗎?

進行評估
您的瀏覽器已不受支援!

較舊版的瀏覽器通常存在安全風險。為讓您使用我們網站時得到最佳體驗,請更新為這些最新瀏覽器其中一個。

Personalize for Me
Steps Complete!
1
2
3
Continue where you left off
Personalize your Everpure experience
Select a challenge, or skip and build your own use case.
迎向未來的虛擬化策略

因應所有需求的儲存方案

任意規模皆可實行 AI 專案

資料管道、訓練、推論專用的高效能儲存裝置

防護資料遺失問題

保衛資料的網路彈性解決方案

降低雲端作業成本

Azure、AWS 與私有雲專用的高成本效益儲存裝置

加速應用程式與資料庫效能

低延遲儲存裝置,達成應用程式高效能

降低資料中心耗能與空間使用

高效資源運用的儲存裝置,改善資料中心運用率

Confirm your outcome priorities
Your scenario prioritizes the selected outcomes. You can modify or choose next to confirm.
Primary
Reduce My Storage Costs
Lower hardware and operational spend.
Primary
Strengthen Cyber Resilience
Detect, protect against, and recover from ransomware.
Primary
Simplify Governance and Compliance
Easy-to-use policy rules, settings, and templates.
Primary
Deliver Workflow Automation
Eliminate error-prone manual tasks.
Primary
Use Less Power and Space
Smaller footprint, lower power consumption.
Primary
Boost Performance and Scale
Predictability and low latency at any size.
What’s your role and industry?
We've inferred your role based on your scenario. Modify or confirm and select your industry.
Select your industry
Financial services
Government
Healthcare
Education
Telecommunications
Automotive
Hyperscaler
Electronic design automation
Retail
Service provider
Transportation
Which team are you on?
Technical leadership team
Defines the strategy and the decision making process
Infrastructure and Ops team
Manages IT infrastructure operations and the technical evaluations
Business leadership team
Responsible for achieving business outcomes
Security team
Owns the policies for security, incident management, and recovery
Application team
Owns the business applications and application SLAs
Describe your ideal environment
Tell us about your infrastructure and workload needs. We chose a few based on your scenario.
Select your preferred deployment
Hosted
Dedicated off-prem
On-prem
Your data center + edge
Public cloud
Public cloud only
Hybrid
Mix of on-prem and cloud
Select the workloads you need
Databases
Oracle, SQL Server, SAP HANA, open-source

Key benefits:

  • Instant, space-efficient snapshots

  • Near-zero-RPO protection and rapid restore

  • Consistent, low-latency performance

 

AI/ML and analytics
Training, inference, data lakes, HPC

Key benefits:

  • Predictable throughput for faster training and ingest

  • One data layer for pipelines from ingest to serve

  • Optimized GPU utilization and scale
Data protection and recovery
Backups, disaster recovery, and ransomware-safe restore

Key benefits:

  • Immutable snapshots and isolated recovery points

  • Clean, rapid restore with SafeMode™

  • Detection and policy-driven response

 

Containers and Kubernetes
Kubernetes, containers, microservices

Key benefits:

  • Reliable, persistent volumes for stateful apps

  • Fast, space-efficient clones for CI/CD

  • Multi-cloud portability and consistent ops
Cloud
AWS, Azure

Key benefits:

  • Consistent data services across clouds

  • Simple mobility for apps and datasets

  • Flexible, pay-as-you-use economics

 

Virtualization
VMs, vSphere, VCF, vSAN replacement

Key benefits:

  • Higher VM density with predictable latency

  • Non-disruptive, always-on upgrades

  • Fast ransomware recovery with SafeMode™

 

Data storage
Block, file, and object

Key benefits:

  • Consolidate workloads on one platform

  • Unified services, policy, and governance

  • Eliminate silos and redundant copies

 

What other vendors are you considering or using?
Thinking...
Your personalized, guided path
Get started with resources based on your selections.