Forum Moderators: coopster
For example, in mysql client, if I did a query like...
mysql> SELECT id, field2 FROM table LIMIT 2;
...mysql client would display something like...
+----+--------+
¦ id ¦ field2 ¦
+----+--------+
¦ 11 ¦ datum1 ¦
+----+--------+
¦ 12 ¦ datum2 ¦
+----+--------+
...except I want to output this format to a text file. I know I've done this before, but it's been a long time, and I can't remember. My first couple of efforts just output a help file to the *.txt file--which wasn't much help.
Thanks,
Salsa
mysql -u username -t -ppassword databasename < /path/to/input.sql > /path/to/output.txt