Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby ActiveRecord Basics Migrations and Relationships Migrations

kabir k
PLUS
kabir k
Courses Plus Student 18,036 Points

Got a `-bash: mysql: command not found` response when I ran the `mysql -uroot` command

I have been getting a -bash: mysql: command not found response every time I run the mysql -uroot command in the terminal like "Migrations" video suggested.

I have also been getting a similar "command not found" response when I run the subl . command. The response I got in this case was

-bash: subl: command not found

Does anyone know how to fix this problems and if they are related or not?

1 Answer

Hello,

It appears that you do not have those applications installed on your system, or are installed in a location that is not in your PATH variable. If you need further assistance, we'd need to know which OS (including distro in the case of Linux) you are running so we can give instructions based on the proper package manager(if any).

kabir k
kabir k
Courses Plus Student 18,036 Points

My Operating System is OS X Yosemite (10.10.4)

I'm sorry, I'm not as familar with OS X as I am with Linux, so I can't help you make sure they are installed correctly, beyond giving you a few links.

Here is one for setting up subl to work from the command line if sublime is installed.

If you are sure you have installed sublime and mysql, you might want to check that their install locations are in your PATH with

echo $PATH

If they aren't then you can add their locations via

export PATH=$PATH:/path/to/application/directory