Starting AMPPS without password on MAC

The below method will not start AMMPS without password, but instead does start mysql and apache web server if you have AMPPS installed already.

There are 2 steps involved, 1. Modifying sudoers file, and 2. Creating a startup applescript application.

Background

The starting of httpd requires admin privilege whereas mysqld doesn’t. So we create an entry for httpd in sudoers file that enables httpd to launch without a password.

 

Step 1: Modifying sudoers file

Add below line to the section “User privilege specification”. Replace %user with your username

%user ALL= NOPASSWD: /Applications/AMPPS/apache/bin/httpd

sudoer file can be edited by using visudo $ sudo visudo

 

Step 2: Creating a startup applescript application

Creating Applescript app that launches mysqld and httpd

  1. Launch Applescript editor
    Spotlight -> type in “applescript editor”
  2. Create a new script CMD+N
  3. Paste below lines in the script window
    do shell script "sudo /Applications/AMPPS/apache/bin/httpd > /dev/null 2>&1 &"
    do shell script "/Applications/AMPPS/mysql/bin/mysqld > /dev/null 2>&1 &"
  4. Save the file as an Application (File Format -> Application)
    Chose any location and file name. In my case it was /Users/robin/Documents/LaunchAmpps.app
  5. Add the saved app to startup.
    Drag and drop the app to “Login Items” for your username in “Users & Groups”

That is all required to make mysql and httpd to launch after staring your mac. It doesn’t launch AMPPS console but lets you run the required services for your development environment.

 

HTH

 

 

You may also like...

Leave a Reply

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