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

--

--

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.