SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Addict delpino's Avatar
    Join Date
    Nov 2001
    Location
    London
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Starting MySQL + Apache Services with one click

    I use a local Apache and MySQL Windows version for developing. As I don't want to autostart those two applications I wonder if there is a way I could start the services Apache and MySQL with a single click.

    I noticed if I don't start MySQL as a service the database could become invalid when I shut down the computer.
    http://www.antosch-and-lin.com - Language Learning

  2. #2
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can create a batch (.bat) file with the following lines:
    Code:
    NET START mysql
    NET START apache
    Replace 'mysql' and 'apache' with the names of your MySQL and Apache services.

  3. #3
    SitePoint Addict delpino's Avatar
    Join Date
    Nov 2001
    Location
    London
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks.. works like a charm
    http://www.antosch-and-lin.com - Language Learning

  4. #4
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you are using Windows 2000 or XP, install them as services and set them to Automatic in the Services control panel. This way they will start with no clicks and run every time you start your computer.
    Wayne Luke
    ------------


  5. #5
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem.

    I don't like them starting automatically too since I don't need them everytime.

  6. #6
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by W. Luke
    If you are using Windows 2000 or XP, install them as services and set them to Automatic in the Services control panel. This way they will start with no clicks and run every time you start your computer.
    Wayne, I'm looking to find out how to do this. How do I install a program as a service? Particularly Apache.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  7. #7
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by creole
    Wayne, I'm looking to find out how to do this. How do I install a program as a service? Particularly Apache.
    For Apache, add on the -k parameter.. This will install it as a service in your system.

    As far as I know, an application has to be compiled to run as a service. You can't just set up any application that way. If the application is capable of it, then it should give you an option while installing it or provide a command line parameter like Apache does.
    Wayne Luke
    ------------


  8. #8
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by W. Luke
    For Apache, add on the -k parameter.. This will install it as a service in your system.

    As far as I know, an application has to be compiled to run as a service. You can't just set up any application that way. If the application is capable of it, then it should give you an option while installing it or provide a command line parameter like Apache does.
    Not sure what you mean by adding on the -k parameter. WHen I start Apache, I double click "Apache.exe" to stat it.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  9. #9
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wayne meant to install it as a service.

    http://httpd.apache.org/docs/win_service.html

  10. #10
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by creole
    Not sure what you mean by adding on the -k parameter. WHen I start Apache, I double click "Apache.exe" to stat it.
    Run it from the command prompt like:

    apache -k



    I should add that newer versions of the Windows Installer for Apache will automatically set it up as a service for you.
    Last edited by Hierophant; Mar 12, 2003 at 10:19.
    Wayne Luke
    ------------


  11. #11
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by W. Luke
    Run it from the command prompt like:

    apache -k



    I should add that newer versions of the Windows Installer for Apache will automatically set it up as a service for you.

    Ah...I didn't install it. NuSphere did it for me.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •