How to Install XAMPP 1.7.3 on Mac OS X

xampp-logo-225x225NOTE TO READERS: This blog is only relevant for versions of XAMPP prior to 1.8.3.  Since the release of XAMPP 1.8.3, Apache Friends has synced up all the capabilities for Linux, Mac OS and Windows versions and fixed the problems addressed in this blog. Now you just load with the installer script and everything works right out of the box.

XAMPP provides a convenient means of getting a LAMPP system up and running. XAMPP rolls the Apache web server, FTP server, PHP and MySQL subsystems into a single installation package. It also includes phpMyAdmin which is an easy to use browser interface to manage your MySQL database.

There are versions of XAMPP for Linux, Windows and the Mac OS X. XAMPP is installed and configured diffferently on each of these platforms due to the XAMPP revision included in the package and the quirks of the underlying OS.  In this article I’ll cover how to setup XAMPP on the MacOS in order to get everything working properly.

Mac OS X Installation Procedure

  1. Download the latest XAMPP for Mac – 1.7.3 as of this writing – on the XAMPP MacOS X page.
  2. Open the DMG package and drag the XAMPP folder into your /Applications folder. All the XAMPP files are contained in the /Applications/XAMPP/xamppfiles folder with links to cgi-bin, htdocs, etc and logs folders.
  3. Start the Apache, MySQL and FTP servers by clicking on the button for each of these services in the XAMPP Contol Panel.  Each of the service lights should show green like this:

  1. Open http://localhost in a browser. You should a get a browser window with the XAMPP for Mac OS X startup screen:

  1. At this point most of the setup work for XAMPP is done.  However, if you plan to use phpyMyAdmin you’ll have to do a little further configuration to get it to work properly. Open phpMyAdmin by clicking on the phpMyAdmin link in the XAMPP window under Tools or enter http://locahost/phpmyadmin in your browser.  You will be taken directly to the phpMyAdmin page with some messages at the bottom of the screen telling you that you have to deal with some configuration issues relate to the phpMyAdmin database and that a root password is not set for MySQL.  Let’s deal with each of these problems.
  2. XAMPP does not create all the tables that phpmyadmin needs so you have to do this with an SQL script that is enclosed with the package. To do this click on the Import tab in the toobar at the top of the screen.

  1. Click on the Choose button in the File to import section.

  1. Choose the create_tables.sql script in /Applications/XAMPP/xamppfiles/phpmyadmin/scripts folder.
  2. Click on the Go button in the Format of imported file to run the script which will add all the tables you need to the phpmyadmin database.
  3. Open the Terminal application.
  4. Change to root user by typing:
  5. Open /Applications/XAMPP/xamppfiles/phpmyadmin/ in your editor of choice.
  6. Uncomment the following lines in the file.
    $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; 
    $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
    $cfg['Servers'][$i]['relation'] = 'pma_relation';
    $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
    $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
    $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
    $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
    $cfg['Servers'][$i]['history'] = 'pma_history';
  7. Add the following $cfg parameter to this list.
    $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
  8. Change the authentication type as follows:
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
  9. To set a root password for phpmyadmin click on the Privileges in the XAMPP Control Panel toolbar.

  1. Click on the edit icon in the column to the right on the User Overview table for the root account on localhost. Note: I borrowed this graphic from the Linux blog, so ignore the entries that say “linux”.


  1. Click on the Password radio button in the Change password section of the Edit Privileges: User ‘root’@’localhost’ page.
  1. Enter the new password then re-type the password.
  2. Click on the Go button to save the new password.
  3. Repeat steps 17 – 20 for root on
  4. Close your browser then restart Apache and MySQL in the XAMPP Control Panel.
  5. Open phpMyAdmin in your browser.  This time you’ll be take to a phpMyAdmin login screen.
  6. Login as root using password you set in step 19.

If everything went well you’ll go to the phpMyAdmin main screen and see a green Exit icon under the phpMyAdmin frame on the left side of the screen.  You can now create other databases and tables with phpMyAdmin.


Article by Vic Hargrave

Software developer, blogger and family man enjoying life one cup of coffee at a time. I like programming and writing articles on tech topics. And yeah, I like coffee.


  1. Hi Vic! Thanks for your reply!

    Probably not! Can you advise how to edit my permissions to edit this?! Can I control this at the editor level?

    1. Ok you’ll have to edit your config.php file as root. Try this out:

      1. Open your Terminal application. It should be in /Applications/Utilities.
      2. Type: sudo su
      3. Use your login password
      4. Open in your editor.

      Now you should be able to save the changes to the file. Let me know how it goes.

      1. Hi Vic!

        Thanks for all your help! I used the Terminal steps you provided and downloaded a new version of TextWrangler and had no issue!

        Thanks for all your help! This was a great tutorial! 🙂

        1. Glad to hear it Chelsea. After you get comfortable with XAMPP for Mac OS try it on Linux. The Linux version has a later version of PHP and, if I’m not mistaken, MySQL also.

  2. Hi Vic,
    I am trying to install Joomla using XAMPP so I can develop a website before I purchase hosting. I am not having much luck on my Mac (running Lion.) Any help would be greatly appreciated.

  3. Thank you for your response, Vic. I should have asked a more specific question, I had not done enough research when I asked that first question. My problem is this: I cannot edit the file because it is locked. When I use the “sudo su” command in terminal, it seems to work fine – I get the response “sh-3.2#” after entering my admin password. However, I still cannot edit the config file in text and I still cannot unlock it for editing. It gives me the option to create a duplicate which I can edit, but I am not sure if creating a duplicate will accomplish step 15 as instructed on your site. I am running Lion.
    Also, for the sake of brevity, once I have access edit this file I would just like to check and make sure “uncommenting” the lines of code you instruct entails removing the “//” from the beginning of the lines. I greatly appreciate any help you can offer, as well as your website which is well written and very accessible. Thanks in advance!

    1. It may be that is not writable by anyone. After getting to root level access with ‘sudo su’ go to the /Applications/XAMPP/xamppfiles/phpmyadmin then type

      chmod a+rw

      That will make the file writable by anyone. Then uncommenting any given line involves removing the ‘//’ from the beginning line as you say.

      1. Hi Vic, I’m stuck when trying to change
        after I did all the steps above, still not work. and this from the terminal

        “sh-3.2 # / Applications / XAMPP / xamppfiles / phpmyadmin
        sh: / Applications / XAMPP / xamppfiles / phpmyadmin: is a directory
        sh-3.2 # chmod a + rw
        chmod: No such file or directory”

        can You tell me what is wrong, I run on maverick
        Thanks everything

        1. I think you didn’t find because you were not in the right directory. Try these commands (note I’m using your command line prompts ‘sh-3.2 #’):

          sh-3.2 # cd /Applications/XAMPP/xamppfiles/phpmyadmin
          sh-3.2 # chmod a+rw ./

          Then you can open the file with vi or whatever editor you want to use.

  4. I’ve done all the things you’ve stated above
    but still can’t yet save the file
    what should i do now

  5. The error i get is
    Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.

    when i click on phpadmin after dragging the dmg to the applications folder, please help? I already tried clearing my cookies and browsing data.

    1. You have to follow the directions in my blog starting at step 5. Go through each step after that carefully and you should be OK. Let me which step is a problem and I’ll try to help you figure it out.

  6. Hmm it lоoks lіke your blog ate my firѕt сomment (іt wаs super
    long) so I gueѕѕ I’ll just sum it up what I wrote and say, I’m thoroughly еnјoying your blοg.

    Ι аs well am an aspiring blog writeг but I’m still new to everything. Do you have any recommendations for inexperienced blog writers? I’d gеnuinely аpрrecіate it.

  7. I’ve done everything listed above, but on step 22 Xampp doesn’t start MySQL Database.
    I click repeatedly on start button, it says it’s Starting but after awhile it stops.
    Tried to boot osx too but no success.
    I’ve already uninstalled and then installed Xampp once again, done all the steps above — and again the same issue.
    Don’t know what’s going on.

    1. You could try looking at the error_log file in your XAMPP folder. Open a terminal then type the following command:

      tail -f /Applications/XAMPP/logs/error_log

      Then start MySQL to see what log entries pop up. Let me know what you find out.

  8. hai vic , can you help me? i have problem in step 10. We must open Terminal and type : Open /Applications/XAMPP/xamppfiles/phpmyadmin/ but my Terminal said “No such file or directory” can you give me a solution ? thank you 🙂

    1. My guess is the installation did not go so well. Reinstall XAMPP then type ‘ls /Applications/XAMPP/xamppfiles/phpmyadmin/’. You should see there. To edit it you’ll need to su to root by typing ‘sudo su’ then giving your password – not the root password. If that succeeds then you can edit it with ‘vi’.

      I hope this helps.

  9. Hi, I just installed XAMPP for Mac OS X 1.8.3 but I can’t start MySql. When I check status it says deactivated. I have uninstalled and reinstalled many times but the problem is still there. How do I activated MySql?


    1. I just downloaded and installed the same version. MySQL starts up successfully for me. If you post some logs, perhaps I can help you figure out what it going wrong.

  10. I’ve installed the latest XAMPP (1.8.3-1) on my machine running os x 10.7.5. When I get to step 3, Apache will not start. When I browse to http://localhost, I get the “It Works” page that I get using the local web host I set up with Terminal.

    Is there a way to turn off (stop, disable, whatever the word is) the local web host so that I can run XAMPP instead?

    Thanks for your attention.

  11. Any idea how can I install Xampp for Mac in different directory?
    I have a 128gb SSD Drive for Applications and I like to have the Xampp on another drive.

    1. I don’t see any way to install somewhere else with the standard Mac install package. However you can move most of the files to another location if you do the following:

      1. Install XAMPP in /Applications
      2. sudo su
      3. cd /Applications/XAMPP
      4. mv xamppfiles/ /Volumes/extdrive (assuming you call your external drive “extdrive”)
      6. ln -s /Volumes/extdrive/xamppfiles xamppfiles

      The last step satisfies all the symbolic links in /Applications/XAMPP that point to the xamppfiles folder. This seemed to work in my environment.

  12. Hi,

    I can’t find the create_table.sql and there’s no scripts folder under phpmyadmin. I’m running Xampp 1.8.3. Any ideas how to set this up? Many thanks.

    1. For XAMPP 1.8.3 the steps involved in setting up phpMyAdmin are not necessary. I’ll add a comment to the blog that mentions my article is relevant only to 1.7.3. Thanks for your input.

  13. hi vic

    am tryin to install it on my mac and am stuck at step 13,
    it says that i cant make changes to the file unless i duplicate the file.
    should i go through ?

    1. The steps I outline in this blog are for 1.7.3. If you get the latest Xampp 1.8.3 for Mac OS, you just install and go. Apache Friends has cleaned up the version so they all install more easily.

  14. Dear Vic,

    I am stuck at this point.

    Change to root user by typing:

    Open /Applications/XAMPP/xamppfiles/phpmyadmin/ in your editor of choice.

    How do I move on from this point because once i type in the above, it opens up Dream weaver.

    Please help as I am stuck.



Leave a Reply

Your email address will not be published. Required fields are marked *