Softaculous


Topic : Start APACHE and MYSQL on mac os x boot without admin password


1

Posted By: motorlatitude on June 9, 2012, 7:12 pm
Okay, this annoyed me for quite a while, I could start AMPPS on boot but I would have to input my username and password each time, which as you can imagine is very tedious, also, I found the AMPPS window pointless and more of a hassle than useful, sure when I need it, but, most of the time I didn't need it, well I created a small work around, I'm not really sure where to post it but this seemed the right place :)

1. Launch the AppleScript-Editor (search in spotlight, if you don't know where it is)
2. Type in the following code:
Code

do shell script "sudo /Applications/AMPPS/apache/bin/httpd &" password "ADMIN PASSWORD" with administrator privileges

do shell script "/Applications/AMPPS/mysql/bin/mysqld > /dev/null 2>&1 &"

Replace the ADMIN PASSWORD with the systems admin password
3. Save it as a run-only application
4. Move the file where ever you want.
5. Right click on the application file, you have created, and click on "show package contents"
6. Go to the info.plist file and open this in Textedit (or any other editor)
7. Add these 2 lines of code after the first "<dict>" tag:
Code

<key>LSUIElement</key>
<true/>

8. Save & close
9. Go to System Prefrences>Users>login-items
10. Drag the application file into the list.
11. Open AMPPS and go to the menubar icon>configuration>AMPPS
12. Uncheck "Start on Session Startup." and "Start Apache and MySQL on application startup." (may already be unchecked)
13. Done

If you followed the steps, everything should work and the apache webserver and mysql will launch on startup without opening the AMPPS windows.

If you experience any problems let me know :)

Posted By: prophetizer on May 19, 2013, 4:05 pm | Post: 1
fantastic, thanks so much!

Posted By: Paul75 on June 6, 2013, 9:48 am | Post: 2
but after when I launch the AMPPS it not tell that mysql and Apache start....

Posted By: tidus on June 6, 2013, 11:49 am | Post: 3
Quote From : Paul75 June 6, 2013, 9:48 am
but after when I launch the AMPPS it not tell that mysql and Apache start....


They should be running as a service. Check if you can access localhost.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: Paul75 on June 6, 2013, 11:53 am | Post: 4
Quote From : tidus June 6, 2013, 11:49 am
Quote From : Paul75 June 6, 2013, 9:48 am
but after when I launch the AMPPS it not tell that mysql and Apache start....


They should be running as a service. Check if you can access localhost.


Hello,

Yes I can access on localhost.

Posted By: tidus on June 6, 2013, 11:55 am | Post: 5
Hi,

Apache and MySQL are started as a service now. So starting AMPPS windows is not needed now. Since it not started by Ampps, "Apache Started" or "MySQL started" wont be displayed.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: Paul75 on June 6, 2013, 12:04 pm | Post: 6
Quote From : tidus June 6, 2013, 11:55 am
Hi,

Apache and MySQL are started as a service now. So starting AMPPS windows is not needed now. Since it not started by Ampps, "Apache Started" or "MySQL started" wont be displayed.


Okay Thanks.

Posted By: prophetizer on June 6, 2013, 1:03 pm | Post: 7
i don't understand why this isn't built into ampps by default

Posted By: tidus on June 7, 2013, 5:18 am | Post: 8
Hi,

In next version we will be adding it.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: motorlatitude on June 7, 2013, 9:36 am | Post: 9
Happy this helped some people, I forgot I made this post :P
Good to know that this will be introduced in the next version :D

Posted By: Paul75 on June 7, 2013, 6:02 pm | Post: 10
Quote From : motorlatitude June 7, 2013, 9:36 am
Happy this helped some people, I forgot I made this post :P
Good to know that this will be introduced in the next version :D


Hello,

And after in my : ~/.bash_profile : when I can add alias to stop mysql manually ?

I I do :
alias mysqld='sudo /Applications/AMPPS/mysql/bin/mysqld'
it say me :
130607 20:01:57 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

130607 20:01:57 [ERROR] Aborting

130607 20:01:57 [Note] /Applications/AMPPS/mysql/bin/mysqld: Shutdown complete

But  not stopping....

Thanks

Posted By: tidus on June 8, 2013, 5:27 am | Post: 11
Quote From : Paul75 June 7, 2013, 6:02 pm
Quote From : motorlatitude June 7, 2013, 9:36 am
Happy this helped some people, I forgot I made this post :P
Good to know that this will be introduced in the next version :D


Hello,

And after in my : ~/.bash_profile : when I can add alias to stop mysql manually ?

I I do :
alias mysqld='sudo /Applications/AMPPS/mysql/bin/mysqld'
it say me :
130607 20:01:57 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

130607 20:01:57 [ERROR] Aborting

130607 20:01:57 [Note] /Applications/AMPPS/mysql/bin/mysqld: Shutdown complete

But  not stopping....

Thanks


Just
Code
/Applications/AMPPS/mysql/bin/mysqld
skip sudo


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: Paul75 on June 8, 2013, 6:53 am | Post: 12
If I do : /Applications/AMPPS/mysql/bin/mysqld start it the same message.

To to stop the same message.

For stopping I mut do : /Applications/AMPPS/mysql/bin/mysqladmin -uroot -proot --socket=/Applications/AMPPS/mysql/tmp/mysql.sock shutdown


Thanks

Posted By: Paul75 on June 17, 2013, 6:02 pm | Post: 13
Quote From : tidus June 7, 2013, 5:18 am
Hi,

In next version we will be adding it.


Hello,

I you do in the last version, we also must do a function in the web interface to start/stop/restart apache/mysql/server....

Posted By: tidus on June 18, 2013, 12:25 pm | Post: 14
Hi,

Okay we will discuss about that.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: clau on January 6, 2014, 7:49 am | Post: 15
Hi,

I switched from MAMP for some reasons. MAMP allows to start/stop/restart servers without typing the password. I tried also the above solution but it's not very accurate because the GUI became useless. Using AMPPS as a developer I need often to switch the PHP version and restart Apache. But I need to go to console and perform this.

It would be very helpful for developers if AMPPS will be able to start/stop/restart servers without admin password from GUI. Wonder if there's a plan or any progress in this direction.

Posted By: tidus on January 6, 2014, 7:56 am | Post: 16
Hi,

Yes. We are planning.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: jingato on January 3, 2016, 3:33 pm | Post: 17
Quote From : tidus January 6, 2014, 7:56 am
Hi,

Yes. We are planning.


Any update to this? That response was two years ago but I still have to type my password in every time I start/stop a service or do things like add a domain.

Thanks

Posted By: davestewart on January 21, 2016, 11:15 am | Post: 18
+1

Posted By: davestewart on January 21, 2016, 11:15 am | Post: 19
+1

Posted By: davestewart on January 21, 2016, 11:59 am | Post: 20
I actually used this post to edit my sudoers list and have AMPPS only ask for the password the first time, on MacOSX:

http://askubuntu.com/questions/39281/how-to-run-an-application-using-sudo-without-a-password#135838

Posted By: WebMystic on March 21, 2018, 9:12 pm | Post: 21
Hello AMPPS community.  I've spent the last 1+ attempting to get AMPPS to auto start without asking for a password and have failed.  I've edited the sudoers file, created application using appleScript Editor but nothing seems to work.

I just switched from OSX 10.12 to a newer Mac Mini which has High Sierra on it.

Has there been a solution made as of yet ad if so, can someone please let me know about it.
Specs:
Mac mini (Mid 2011)
macOS High Sierra

Let me know if you need anymore information. 

WebMystic

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.