Solved: How to execute a SQL query from shell
Posted: Mon Dec 27, 2010 8:04 pm
Hello,
How do I execute a SQL query directly from shell command line?
Thanks,
How do I execute a SQL query directly from shell command line?
Thanks,
Forum of Webmaster2020.com
https://www.webmaster2020.com/forum/
Code: Select all
mysql -u user -p -e 'SELECT data FROM table;' database
Code: Select all
mysql -u user -p'password' -sNe 'SELECT data FROM table;' database