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

Databases

Henrik Christensen
seal-mask
.a{fill-rule:evenodd;}techdegree
Henrik Christensen
Python Web Development Techdegree Student 38,322 Points

Access MySQL, MAMP

Hi,

I'm trying to access MySQL on MAMP (in windows cmd line) and I've done almost everything but nothing seems to work.

I tried the /Applications/MAMP/Library/bin/ instruction from MAMP website but this is not working either - not sure is this is because my MAMP folder is not stored in the Application folder? And when I go inside my MAMP folder it looks different structured than this path.

Any ideas how to get this working?

1 Answer

Missy Kailet
Missy Kailet
4,475 Points

To use MySQL via the command prompt, you need to first ensure MAMP's Apache and MySQL services are running, then navigate to the appropriate folder with mysql.exe in it (default is *C:\MAMP\bin\mysql\bin*).

Once in the appropriate directory, log in with your username by typing:

mysql -u username -p{password}

You should now have a mysql prompt.

Imgur

Question is a bit old, but since it was in the list of questions emailed to me and it's still opened, I figured I'd answer :) Cheers!