mysql execute command from command line

C++
mysql -u <user> -p -e "select * from schema.table"
Source

Also in C++: