Watch output of MySQL query over time I'd like to run a query every few seconds and show the output in a console window.  From bash, using watch:

watch "mysql -A -pXXXXX -h host -D dbname -u username --vertical -e \"SELECT rowID FROM IDs LIMIT 1\""


With the output:

*************************** 1. row ***************************
rowID: 68434810


I'd like to not disconnect and reconnect every 2 seconds though.  Is there a better way?
There's a cheap/low-tech way of doing this:

while [ 1 ] ; do echo "select rowid from ids limit 1;" ; sleep 2; done \
 | mysql -u ...


Ctrl&nbsp;C to interrupt.