Skip to content

Instantly share code, notes, and snippets.

@eric-pommereau
Created July 19, 2014 12:30
Show Gist options
  • Save eric-pommereau/2313b3c95153e24e65f6 to your computer and use it in GitHub Desktop.
Save eric-pommereau/2313b3c95153e24e65f6 to your computer and use it in GitHub Desktop.
Mysql stuffs
# execute an external sql command
mysql -e "delete from db_flight.flight_point WHERE YEAR(date_time) = '2013' and month(date_time)='01';"
# dump a DB and a TABLE, using a filter
mysqldump --where="date_time between '2014-01-01' AND '2014-12-31'" db_flight flight_point | gzip >./2014-export.sql
#import some datas in a spécific DB
mysql -h localhost -uxxxx -pxxxx ati-import < myDumpFile.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment