sabato 4 settembre 2010

MySql and watch for data changes from shell

This is an useful command that I use where I need to watch data changes in a mysql table:


 watch -n 1 "echo \"select * from fnbl_user;\" | mysql --password=yourpassword --database=funambol"
I use the feauture of mysql client program that accept statements from standard input.
This command execute the select query from the specified table every second.

Nessun commento: