I have a SQL file saved to my desktop SQL.sql
. When I run /Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
the Mysql monitor starts in the terminal. How do I execute the SQL file from my desktop?
I tried source user\Desktop\SQL.sql
from this question : How to run SQL script in MySQL?
and got
ERROR:
Failed to open file 'user\Desktop\SQL.sql', error: 2
Should the command be run here or elsewhere?