Results 1 to 17 of 17

Thread: [Resolved] Apache and MySQL as a sevice?

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    [Resolved] Apache and MySQL as a sevice?

    I posted this elsewhere, but since MySQL and Apache go so well with PHP, and I'm not getting an answer, I thought I'd post the question here, too.


    Using Windows XP, I want to have Apache and MySQL run as a service, but only on one name. So when I log onto this name, Apache and MySQL will be running in the background.

    How can I set this up?
    Last edited by The Hobo; Oct 16th, 2003 at 12:14 PM.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    I'm not on my home computer so I can't actually test it out, but doesn't Windows XP allow different "startup.ini," one per user account? If so, you can just do what I do and put the MySQLd.exe and Apache.exe files in your user's startup folder. I'm not 100% positive but I think that's what you can do, and if not, I can try it out at my house in about 3 hours.
    Like Archer? Check out some Sterling Archer quotes.

  3. #3
    Hyperactive Member
    Join Date
    Jan 2002
    Posts
    448
    why cant you just run them as two seperet services?

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Originally posted by Muk108
    why cant you just run them as two seperet services?
    They are separate services... what The Hobo wants to do is only run those services when HE logs into the PC.... if someone else logs in, don't let the services run....
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by kows
    I'm not on my home computer so I can't actually test it out, but doesn't Windows XP allow different "startup.ini," one per user account? If so, you can just do what I do and put the MySQLd.exe and Apache.exe files in your user's startup folder. I'm not 100% positive but I think that's what you can do, and if not, I can try it out at my house in about 3 hours.
    I think if I just put apache.exe in there it will load up the console window, rather than stick it in the background. I don't want to see the console window.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  6. #6
    Hyperactive Member
    Join Date
    Jan 2002
    Posts
    448
    on the service cant you jsut manualy start it? fromt he service window thing. or is there property to set who can access it?

  7. #7

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I don't know what you're talking about.

    I don't want to manually start it. I want it to start up each time I log on to a particular name.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Go to Control Panel > Services.

    In the Apache2 service properties, you should see the path as:

    "C:\Program Files\Apache Group\Apache2\bin\Apache.exe" -k runservice


    and the mySQL path as:

    C:/mysql/bin/mysqld-nt.exe



    You can add these to the startup, so they'll be running when you login next time.

    However, you can't rename services or create a "single" service for both of these together. The applications just won't work then.


    You might also want to look at this: Go to the services console again, double click on Apache, and go to the LOGON tab. I think you can set it to run whenever you login with this username and password.


    HTH

  9. #9

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Q

    Originally posted by mendhak
    Go to Control Panel > Services.

    In the Apache2 service properties, you should see the path as:
    I don't see anything about apache in there. And I'm not running Apache2.


    Originally posted by mendhak
    However, you can't rename services or create a "single" service for both of these together. The applications just won't work then.
    I don't want a single service for them both together. I just want them both to run.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  10. #10
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    make a shortcut to apache.exe, add these parameters to start it, or just whatever you want:

    C:\Apache\Apache\Apache.exe -w -n "Apache" -k start
    stick it in your user start up folder.

    make a shortcut to mysqld.exe and throw it in your start up folder too. the console for mysqld will run when you start up, but it will go away after a second or two, or at least it does for me.. the console for apache will open, start the server, and close after it has been successfully started.
    Like Archer? Check out some Sterling Archer quotes.

  11. #11

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Thanks, I'll give it a try when I get home.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  12. #12
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    after you click on the prperties on said service you have a tab called "log on". the second radio button tells it what user to run as or when you olog on as that user.

    for apache 1.xx I am not sure if you can run it as a service.

  13. #13

  14. #14

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by phpman
    http://httpd.apache.org/docs/win_service.html
    I already read through that. Confused the crap out of me.

    'Course I'm taking heavy meds right now, so maybe I should wait a week and try again.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  15. #15

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I reinstalled Apache as a service, and now kows suggestion is working. Thanks.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  16. #16
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    if you installed it as a service then putting it in the startup is not need. actually if you did that then it is not a service anymore.

  17. #17

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by phpman
    if you installed it as a service then putting it in the startup is not need. actually if you did that then it is not a service anymore.
    I installed it as a service and did your suggestion by trying to put the user in the service properties and it did not work. Apache didn't load.

    Quite frankly, I don't care if I'm running it as a service or not. I just want the damn thing to run when I sign on a name. And it does that now.

    My problem is resolved.
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

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



Click Here to Expand Forum to Full Width