Skip to content

Instantly share code, notes, and snippets.

@erayaydin
Created May 27, 2018 23:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erayaydin/28d78cb041232ff93234fcac1740aac5 to your computer and use it in GitHub Desktop.
Save erayaydin/28d78cb041232ff93234fcac1740aac5 to your computer and use it in GitHub Desktop.
Monitoring on Mysql Import/Export
### Determine total size
#
# SELECT
# Data_BB / POWER(1024,1) Data_KB,
# Data_BB / POWER(1024,2) Data_MB,
# Data_BB / POWER(1024,3) Data_GB
# FROM (
# SELECT SUM(data_length) Data_BB
# FROM information_schema.tables
# WHERE table_schema IN ('database')
# ) A;
### Pipe Viewer
mysqldump -uUSER -pPASSWORD DATABASE | pv -s sizeM > output.sql
# Pipe Viewer
pv file.sql | mysql -u user -p database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment