Invoking Mysql Statement On A Command Line |
|
May 13, 2008 |
Yesterday, my supervisor gave me a task which is to search the servers where the client had his alerts invoked because he will need it for his profile to be updated. The only way to do this is by searching from all servers (there are 32 of them) which is quite time consuming but not as difficult as it seems. I sought help from another supervisor. I did the research and he did the script which will search for the entry in all servers by just running the script on one server. The easiest way to do this is by knowing how to execute a mysql statement through a command line. Here is how it goes:
mysql -u(username) -p(password) -e “(sql statement) (field) (sql statement) (table)” (database name)

May 13, 2008
Leave a Reply