Automatic lauch MySql

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Automatic lauch MySql

Postby ylelouer » 07. February 2016 23:54

Hello,
I don't need all servers to be running, just MySql.
Is there a way to lauch MySql when OSX starts ?
Thanks in advance for your help.

YLL
ylelouer
 
Posts: 4
Joined: 07. February 2016 23:45
Operating System: OSX

Re: Automatic lauch MySql

Postby Nobbie » 08. February 2016 11:53

With the help of the start script "lampp" (or maybe "xampp" on OSX, i do not have an OSX here), you may not only start the whole bunch, but also only single tools:

With "./xampp start" (as root or admin) you are starting all tools, but instead with "./xampp startmysql" you can start mysql only (same for Apache with "./xampp startapache" etc.). Replace the dot "." by the full Application path (see above, I dont know the OSX version) and you have the command you need to insert in your system setup for starting certain services on startup (i dont know how to start services in OSX, but this is OSX knowledge anyway and you should know how to do so).
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Automatic lauch MySql

Postby ylelouer » 08. February 2016 12:55

Thank you for your indications. I'll try out and will let you know if/how it works with osx.
ylelouer
 
Posts: 4
Joined: 07. February 2016 23:45
Operating System: OSX

Re: Automatic lauch MySql

Postby ylelouer » 08. February 2016 15:10

The terminal (equivalent to cmd in windows) syntax wil be : /applications/xampp/xamppfiles/xampp startmysql.
Now I will check how to do this at startup.
Thanks for your help.
ylelouer
 
Posts: 4
Joined: 07. February 2016 23:45
Operating System: OSX

Re: Automatic lauch MySql

Postby ylelouer » 10. February 2016 16:46

Hello Nobbie,
Finally I found the solution by grabbing pieces of information on various other forums.
The easiest solution is to use an apple script.This is how I did it:
Open the Applescript editor (in the utilities folder)
Type the following line:
do shell script "sudo /applications/xampp/xamppfiles/xampp startmysql" password "mypassword" with administrator privileges
(Replace "mypassword" with your actual password).
Save the file as an application, test it and compile it. (I named it StartXamppMysql).
Move the generated .app file to the applications folder.
Add this application to "Preferences/users/open".
It works fine under EL Capitan.
Thanks for your initial help.
ylelouer
 
Posts: 4
Joined: 07. February 2016 23:45
Operating System: OSX


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 17 guests