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?