Created
May 27, 2018 23:29
-
-
Save erayaydin/28d78cb041232ff93234fcac1740aac5 to your computer and use it in GitHub Desktop.
Monitoring on Mysql Import/Export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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