0

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

terminal

Should the command be run here or elsewhere?

Aaron Navies
  • 1,213
  • 1
  • 11
  • 16
  • 1
    Try an absolute path to the SQL file. I don't know MacOS filesystem structure but it should be something like `/Users/[your username]/Desktop/SQL.sql`. – Jason Apr 08 '19 at 21:46
  • nice. think it worked. I still have an error but its only in the SQL file. I will trouble shoot that. thank you! – Aaron Navies Apr 08 '19 at 21:50

0 Answers0