Apple MacBook Pro phpMyAdmin

How to setup phpMyAdmin on a Mac with OSX 10.8 + (MAMP Part 3)

52 thoughts on “How to setup phpMyAdmin on a Mac with OSX 10.8 + (MAMP Part 3)

  1. Hey, this is indeed the simplest, clearest guide to setting up MAMP I have found. Much appreciation for your work.
    I worked through Parts 1, 2 and 3 without problems, until I get to Part 3,
    Step 5 and cannot log into http://localhost/~richard/phpMyAdmin/
    -Though I see “Welcome to phpMyAdmin” page and enter my username/password, I only receive ‘waiting for localhost…’ browser message; the login screen doesn’t change; no error message.
    -Cookies are enabled.
    -I’ve checked my /Sites/phpMyAdmin/ file for username (‘root’ without quote marks) and password; I’m using them in the login screen (though I did try ‘richard’ as username, got same response).
    -I’ve restarted Apache & and stopped/started Mysql (in that order).
    -I’ve changed the as suggested:
    $cfg[‘Servers’][$i][‘host’] = ‘localhost’;
    $cfg[‘Servers’][$i][‘host’] = ‘’;
    -I checked Apache for errors with sudo apachectl -t and received the following:
    “httpd: Could not reliably determine the server’s fully qualified domain name, using Richard-Prices-Computer-4.local for ServerName
    Syntax OK.” I don’t know if this means anything is wrong or not.
    -I’ve tried everything except resetting the mysql password (your first reply to a question). i’m afraid I’m command line ignorant; I couldn’t get those commands to work in Terminal.
    -I’m at wits end. Any help?

    1. Argh. Okay. Figured it out. Disregard my post of yesterday.
      I had left my “User for config auth” in the Authentication tab of the “Add a new server” screen set to ‘root’ (failed to change it to my username). Now all is well to this point!
      Amazing what a few hours break will do, that plus a 2nd walk thru the steps.

      1. Hi Richard,

        Sorry for the late response. It is amazing what a couple hours away will do. I’m constantly surprised by that myself. Thanks for taking the time to comment. Have a great day.

  2. Hi Jonathan,

    Thanks very much for the great tutorial.

    I have a problem

    Not able to login to phpMyAdmin

    I have already changed
    $cfg[‘Servers’][$i][‘host’] = ‘localhost’;
    $cfg[‘Servers’][$i][‘host’] = ‘’;
    as per your previous posts. But still it doesn’t work
    Can you help me to solve this. I have an interview coming up within 3 days, so I trying to setup and learn php and mysql. Please help me. This is going to be a life saver for me
    Thanks Jonathan


    1. Hi Biju,

      Will send you a private email tonight, hopefully will be able to help you resolve this.

  3. Just want to echo others. These MAMP install guides are among the most useful documents on the subject. I thought I’d have to get all proprietary with Zend (boo demise of community edition) or use my yahoo host to get started. Found your docs and I was up an running in minutes while learning a bit along the way. I’ll certainly be looking to see what other wisdom you have made available. Thanks.

  4. Thanks so much! Greetings from Nigeria, Africa. This is the most helpful tutorial on Mac. Please keep up the good work.

  5. Hey, I’ve got a big one. It doesn’t matter how many times i set up the password, it won’t tell me anything but wrong password. I reset it, and it still asks for the new one.
    Help me out, please.

    1. Hope you were able to resolve this. It is possible that your may need to edit your /Sites/phpMyAdmin/ file

      Update the following line from:

      $cfg[‘Servers’][$i][‘host’] = ‘localhost’;


      $cfg[‘Servers’][$i][‘host’] = ‘’;

      Let me know if this worked for you

  6. please disregard my last question about username. I’ve verified in the config file what my username and password are. However, I’m still not seeing anything happen after I enter the my username and login.

    1. Hi Vick. You will need to make sure the phpMyAdmin configuration file is setup correctly. Take a look at /Sites/phpMyAdmin/ to verify. Hope that helps

  7. Great tutorial. The best by far. One problem for me: In the last step, nothing happens after I input the username and password. What is the MySQL username? is it the same as my username on my macbook? Where were we asked to create a MySQL username?

    1. Until I found your tutorials I meant to say. Once I did it was easy peasy even for a Terminal newbie. Thnx again!

      1. Thanks Freddy, You probably found it doesn’t take long to get your bearings with Terminal. Best of luck with your setup

    1. Hi Tyler,

      It’s hard to diagnose without seeing your setup. That is the right address so it should be working.

      phpMyAdmin has their own documentation that might be of help to you

      go to http://localhost/~username/phpMyAdmin/Documentation.html

  8. Wheewww… 3 hours and 5 different web-tuts later, you have finally got my headache solved. Thank you so much Jonathan for this tutorial, you saved me!

    No on to learning how to create and or import my clients database.

  9. Hey Jonathan,
    Thanks for the tutorial.
    Im a bit stuck though at one step. First I didn’t manage to “fix the socket error” at the beginning, nothing happened when I typed it at the terminal. Then I followed the other steps, however, when I try to go to “http://localhost/~laurasantana/phpMyAdmin/setup/” it says I dont have permission:

    You don’t have permission to access /~laurasantana/phpMyAdmin/setup/ on this server.
    Even though I followed the step on changing permissions. can you help me out a bit?

    1. Hi Laura. It’s possible you may need to change the permissions of the phpMyAdmin folder. This will give Apache permission to access these files. Run the following in your Terminal.

      cd /Users/username/Sites/
      sudo chown -R :_www phpMyAdmin
      sudo chmod -R g+w phpMyAdmin

        1. Hi Manuel, Also try running the following command to see if there are any errors in the configuration files.

          sudo apachectl -t

          Let me know if any errors show up.

          1. MacBook-Pro:Sites USERNAME$ sudo apachectl -t
            httpd: Syntax error on line 131 of /private/etc/apache2/httpd.conf: Could not open configuration file /usr/conf/extra/httpd-phpmyadmin.conf: No such file or directory

            The /conf/ directory doesn’t exist (I checked) What do I do?

          2. Hi Kinect3000,

            Can you share line 131 of your configuration file. It’s a syntax error which likely means a file path is wrong. Easy to fix.

          3. Include conf/extra/httpd-phpmyadmin.conf
            LoadModule proxy_http_module libexec/apache2/

      1. Having the same issue here. Tried it with ~ in the front of the username but none? Any ideas?

  10. #1045 Cannot log in to the MySQL server

    still getting what can i doo

    /* Servers configuration */
    $i = 0;

    /* Server: localhost [1] */
    $cfg[‘Servers’][$i][‘verbose’] = ”;
    $cfg[‘Servers’][$i][‘host’] = ‘localhost’;
    $cfg[‘Servers’][$i][‘port’] = ”;
    $cfg[‘Servers’][$i][‘socket’] = ”;
    $cfg[‘Servers’][$i][‘connect_type’] = ‘tcp’;
    $cfg[‘Servers’][$i][‘extension’] = ‘mysqli’;
    $cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’;
    $cfg[‘Servers’][$i][‘user’] = ‘root’;
    $cfg[‘Servers’][$i][‘password’] = ‘1111’;

    /* End of servers configuration */

    $cfg[‘blowfish_secret’] = ’51a1c71db0f361.43788765′;
    $cfg[‘DefaultLang’] = ‘en’;
    $cfg[‘ServerDefault’] = 1;
    $cfg[‘UploadDir’] = ”;
    $cfg[‘SaveDir’] = ”;

  11. I just wanted to mention that logging in to phpMyAdmin gave me the following error:
    #2002 Cannot log in to the MySQL server

    This can easily be fixed by changing a line in the file:

    Line 14 before:
    $cfg[‘Servers’][$i][‘host’] = ‘localhost’;

    Line 14 after:
    $cfg[‘Servers’][$i][‘host’] = ‘’;

    Thanks for the great tutorial!

  12. Hello Jonathan,

    First of all, thank you for posting this guide. Helped me a lot. I have a problem in logging in. Looking through the web, I found a ton of useless advice, followed most of them and I’m still having the same problem.

    I get this – #1045 Cannot log in to the MySQL server – can you advice what could I possibly be doing wrong in my setup? I really will appreciate it if you can respond to this.

    Thank you.

    1. MySQL doesn’t allow blank passwords by default. You can change that setting. Is your mysql password set correctly?

        1. The error seems like a password error.

          Try resetting your password.
          mysql -uroot
          SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘your password here’);
          flush privileges;

          mysql -u root -p xxxx

Leave a Reply

Your email address will not be published.

Previous post 3 simple steps to test the validity of your new tech idea
Mac MAMP server setup on your local computer Next post How to enable and setup php.ini on a Mac with OSX 10.8 + (MAMP Part 4)