Is it possible to do mysqldump by single SQL query?
I mean tu dump the whole database, like phpmyadmin does when you do export to SQL
Is it possible to do mysqldump by single SQL query?
I mean tu dump the whole database, like phpmyadmin does when you do export to SQL
not mysqldump, but mysql cli...
mysql -e "select * from myTable" -u myuser -pxxxxxxxxx mydatabase
you can redirect it out to a file if you want :
mysql -e "select * from myTable" -u myuser -pxxxxxxxxx mydatabase > mydumpfile.txt
This should work
mysqldump --databases X --tables Y --where="1 limit 1000000"
You can dump a query as csv like this:
SELECT * from myTable INTO OUTFILE 'querydump.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'