Thursday, July 24, 2014

execute mysql query statement through command line

mysql -u root -p -e "show databases;"

or

mysql --defaults-file=/root/.my.cnf --defaults-group-suffix=_test -N -B -e "show databases;"

No comments: