Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Integrating PHP with Databases Databases and PHP Getting to Know the Project

Cant open database.sql on MacTerminal

Hi all

I am having difficulty getting the database file to open via the terminal. I keep getting the following message:

matthewnickolls@Matthews-MacBook-Pro ~ % /Users/matthewnickolls/Desktop/integrating_php_with_databases_s1v1/database.sql zsh: permission denied: /Users/matthewnickolls/Desktop/integrating_php_with_databases_s1v1/database.sql matthewnickolls@Matthews-MacBook-Pro ~ %

I am running it on Catalina 10.15.4.

Presumably I need to enter my admin password but I am not getting a prompt from the terminal to do that. Anyone have any ideas?

Ok so I have got one step further by trying to open it with a preceding 'sudo' but now I am getting this response:

(base) Matthews-MacBook-Pro:~ matthewnickolls$ sudo /Users/matthewnickolls/Desktop/integrating_php_with_databases_s1v1/database.sql Password: sudo: /Users/matthewnickolls/Desktop/integrating_php_with_databases_s1v1/database.sql: command not found (base) Matthews-MacBook-Pro:~ matthewnickolls$