Thursday, January 20, 2011

mysql notes

reminders for some mysql tasks.

Dump a database to a file and compress it.

mysqldump -u root study_manager_development > study_manager_development.sql

gzip -v study_manager_development.sql


Select to outputfile

select id,sku, from line_items where sku LIKE '%u123%' into outfile '/tmp/u123.txt';

No comments:

Post a Comment