Use MySql from Command Line

I tried a script and wanted it to change some settings in mysql as a part of it’s execution.
So I did the following and it worked. You can try your own, have fun!

mysql –user=root –password=MYPASSWORD –database=mysql –execute=”select * from user”

in the execute command you can try all mysql commands and put them in your code. 🙂