Can we run a mysql query through command prompt in windows?

learner picture learner · Sep 16, 2011 · Viewed 30.1k times · Source

Can we run MySQL query from windows command prompt? If so, how can we do that and process the query result through command prompt?

Answer

Devart picture Devart · Sep 16, 2011

Try to use mysql — the MySQL command-line tool with '--execute=statement' or '-e statement' option.