Is there a way of getting the output of a SHOW DATABASES or SHOW TABLES command to output to a text file, similar to how the SELECT ... INTO OUTFILE works?
The INTO OUTFILE produces a syntax error when used on a SHOW command. I am open to external commands if there is a way to produce this using a cmdline tool such as mysqldump.