Monday, April 18, 2011

"MySQL: command not found" on Mac

I'm new to Mac, so I have lot's of basic questions on it. Recently I've installed MySQL on my Mac but when I wanted to run mysql command on terminal, I got the error "command not found". I found out that this command is not added to the path automatically and to create the terminal shortcut, you have to add it using this command:

echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.bash_profile

Of course you have to make sure to adjust the address based on your installation and put your profile name in the command. Done! Now, you can access mysql command from everywhere on terminal.

No comments:

Post a Comment