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

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.