Created
July 19, 2014 12:30
-
-
Save eric-pommereau/2313b3c95153e24e65f6 to your computer and use it in GitHub Desktop.
Mysql stuffs
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
# 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