Check out example codes for "mysql execute command from command line". It will help you in understanding the concepts better.

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com