You're looking for the -t
option. MySQL's Online Help says about -t
:
Display output in table format. This is the default for interactive use, but can be used to produce table output in batch mode.So, when you run mysql from a prompt, you get the nice table format, but when you run in "batch mode" (for example, within a script, or in this case with
watch
), you don't get the formatting without using the -t
. What you want is probably some variation of this: watch -n 1 'mysql -t -e "describe table" database'
which will return the nicely formatted tables.