Results 1 to 10 of 10

Thread: Starting Mysql at boot

  1. #1
    Associate
    Join Date
    Jul 2001
    Location
    West Texas
    Posts
    14

    Starting Mysql at boot

    Which file do I edit to automatically start "httpd" and "safe_mysqld &" ?
    I'm running RH 7.1 and I usually start them manually like this from CL:

    ...root]# service httpd start (starts Apache and switches to non-root user)

    ...root]# su mysql <enter>
    ...bash-2.04$ safe_mysqld & (starts mysql)

    Thanks in advance for your help...

  2. #2

    Re: Starting Mysql at boot

    It'll be one of your rc.d files (depends of wether you boot to X or not).

    In the correct run level make a snnhttpd and snnmysql that call those programs. (where nn is the order that they start in). If you boot into X these should go in run level 5 (rc5.d) or into 3 if you don't (That's for Mandrake, I know some distros are different). Or put the scripts you call into /etc/rc.d/init.d/ and link them to the right run level.

    have a look in /etc/rc.d/rc5.d at some of the other things that get called at boot.

    HTH

  3. #3
    Associate
    Join Date
    Jul 2001
    Location
    West Texas
    Posts
    14

    Re: Starting Mysql at boot

    Thanks Popcorn
    I looked at the rc5.d directory and there is already a file for httpd and mysql but they begin with a "K" not an "S". Is it a simple matter of changing the K to an S in the file name, or should I use chkconfig to set these?

  4. #4

    Re: Starting Mysql at boot

    Mysql readme recommens copying mysql.server file from the support-files directory to /etc/init.d and then you should create a symlink to that file from the run-level in which you want mysql to run.
    For example:
    cd /etc/rc3.d
    ln -s /etc/init.d/mysql.server S84mysqlserver

    P.S. don't forget to chmod +x mysql.server.

  5. #5

    Re: Starting Mysql at boot

    Poppo,
    K is for killing proccesses, S is for starting them. Don't replace K with S. Simply saying, when your linux boots it looks into rc directoriy of the corresponding run level and starts processes that start with S, when it goes down it kills the proccesses taht start with K.

  6. #6
    Associate
    Join Date
    Jul 2001
    Location
    West Texas
    Posts
    14

    Re: Starting Mysql at boot

    Thanks elovkoff for the explanation. I'll work on this and let ev1 know how it went.

  7. #7

    Re: Starting Mysql at boot

    Or you can skip all the BS, run 'setup' as root and select 'System Services' and then select apache (httpd) and Mysql to start at boot time. Very easy.

  8. #8
    Mentor coltrane's Avatar
    Join Date
    May 2001
    Location
    North Carolina
    Posts
    1,390

    Re: Starting Mysql at boot

    this would be a great PET (plain english tutorial)

  9. #9
    Associate
    Join Date
    Jul 2001
    Location
    West Texas
    Posts
    14

    Re: Starting Mysql at boot

    ok KP, that was just too easy.
    /me slapping head saying " I shoulda had a V8".

    Some times I can't see the forest because of the trees!

  10. #10
    Associate
    Join Date
    Jul 2001
    Location
    West Texas
    Posts
    14

    Re: Starting Mysql at boot


    this would be a great PET (plain english tutorial)
    It could be "Starting system services at boot" but what category would it come under?

Similar Threads

  1. Problem starting mysql conflicts with the RPM "mysql-5.0.27-1.fc6"
    By kamakshiganesh in forum Redhat / Fedora
    Replies: 2
    Last Post: 10-26-2007, 04:35 AM
  2. starting pcmcia at boot?
    By S_D_Willie in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 09-17-2004, 02:41 AM
  3. Starting programs on boot
    By flandercan in forum Redhat / Fedora
    Replies: 5
    Last Post: 04-01-2003, 04:00 AM
  4. MySQL Not starting. Can't find solution
    By rbrugman in forum Linux - Software, Applications & Programming
    Replies: 7
    Last Post: 07-20-2002, 02:13 AM
  5. starting Tomcat at boot up
    By alloy in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 07-03-2002, 02:39 PM

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
  •