$ echo "SELECT now()" | mysql.exe -uuserid1234 -ppwd1234\!@ -h 127.0.0.1 -P 3306 mydb
now()
2021-02-09 14:53:14
(stackoverflow.com/questions/6150675/how-to-feed-mysql-queries-from-bash)
$ echo "SELECT now()" | mysql.exe -uuserid1234 -ppwd1234\!@ -h 127.0.0.1 -P 3306 mydb
now()
2021-02-09 14:53:14
(stackoverflow.com/questions/6150675/how-to-feed-mysql-queries-from-bash)