# save output to a file
mysql -u [username] -p [dbname] -e [query] > [filename]
# execute Linux shell command
mysql -u root -p -e "system id"
Linux Privilege Escalation
https://steflan-security.com/linux-privilege-escalation-exploiting-user-defined-functions/