Import MySql dump with progress indicator — Linux

# The command
pv ./mysql-dump.sql | mysql -u user -p databasename

# pv — for monitoring the progress
# mysql-dump.sql — the file we want to import
# user — the mysql user
# -p - will ask for the mysql password
# databasename — the mysql database where we want to import the file
1.13GiB 0:15:26 [10MiB/s] [===========================================>   ] 19% ETA 00:05:38
# notice the added pipe "gunzip"
pv ./mysql-dump.sql.gz | gunzip | mysql -u user -p databasename

--

--

--

Founder binge.app. Curious dev. Laravel / Angular / VueJs / React Native / Docker. Love stand up shows.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to send bulk HTML emails from google sheets?

Rust’s Future: Internal Execution

Is Ruby based on Python?

How to split a monolith into services

SLSQP or Random Python Optimization of Business Tasks — What Is the Choice?

Factorialize A Number Bonfire from freecodecamp.com

Rust for beginners — Part 6 — String

5 books every developer should read, and some extras.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dejan Blazeski

Dejan Blazeski

Founder binge.app. Curious dev. Laravel / Angular / VueJs / React Native / Docker. Love stand up shows.

More from Medium

Git installation on Ubuntu

How to deploy Owncloud on Linux Server with docker

Git and Github — TechnoPals

Using Linux Run Levels for VM termination tasks