Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4241064
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:15:11+00:00 2026-05-21T03:15:11+00:00

I have MAMP installed in my Applications folder on my Mac, and the project

  • 0

I have MAMP installed in my Applications folder on my Mac, and the project files inside the htdocs folder on MAMP.

If I want to connect to MySQL from the command line, what would I type into the command line?

Note, it says that to connect to MySQL from my scripts I need to use the following, but I’m not sure how it will look from the command line

Host localhost
Port 8889
User root
Password root

EDIT – after running sudo ps -aef | grep mysqld in my terminus, I got the following.

 501   528     1   0   0:00.02 ??         0:00.02 /bin/sh /Applications/MAMP/Library/bin/mysqld_safe --port=8889 --socket=/Applications/MAMP/tmp/mysql/mysql.sock --lower_case_table_names=0 --pid-file=/Applications/MAMP/tmp/mysql/mysql.pid --log-error=/Applications/MAMP/logs/mysql_error_log
  501   598   528   0   0:00.77 ??         0:03.72 /Applications/MAMP/Library/libexec/mysqld --basedir=/Applications/MAMP/Library --datadir=/Applications/MAMP/db/mysql --user=mysql --lower_case_table_names=0 --log-error=/Applications/MAMP/logs/mysql_error_log.err --pid-file=/Applications/MAMP/tmp/mysql/mysql.pid --socket=/Applications/MAMP/tmp/mysql/mysql.sock --port=8889
  501  6083  4176   0   0:00.00 ttys000    0:00.00 grep mysqld

EDIT
mysql

working answer
$ mysql –host=127.0.0.1 –port=8889 –user=root -p
Enter password:

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T03:15:12+00:00Added an answer on May 21, 2026 at 3:15 am
    mysql --host=127.0.0.1 --port=8889 --user=root -p
    

    or

    mysql --socket=/Applications/MAMP/tmp/mysql/mysql.sock --user=root -p
    

    The default password for the mysql root account under MAMP is root, so when it prompts for the password, enter “root” (but don’t include the quotes). So, if you want to provide the password right on the main command line, versus prompting for it, do as follows:

    mysql --socket=/Applications/MAMP/tmp/mysql/mysql.sock --user=root --password=root
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now, if I want to run mysql, I have to do /Applications/MAMP/Library/bin/mysql -u
I have MySQL installed (MAMP, Mac OS X) but need to call it by
I'm trying to get away from using Mamp, so have recently installed mysql, edited
I have MAMP already installed in my mac. So the mysql in MAMP is
I have installed MAMP on my laptop and moved my web project (developed using
I am running Mamp as my local server. I Have installed Twig in /Applications/MAMP/svn/twig/twig/lib
I previously had MySQL installed on my Mac before I installed MAMP. So before
Well, I have MAMP installed on my Mac OS X, and I've got PostGres
I have MAMP installed on my Mac OS X, which is installed within my
I always used MAMP with a Mac, so mysql was already installed in it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.