mysqldump - How to take a backup of year specific records from mysql table to a file? -


how take backup of last year records mysql table file?

this should work

mysqldump --databases x --tables y --where="1 limit 1000000" 

or mysql cli

mysql -e "select * mytable" -u myuser -pxxxxxxxxx mydatabase > mydumpfile.txt

reference mysql dump query


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -