Results 1 to 10 of 10

Thread: Prevent mysql starting on boot

  1. #1
    Join Date
    Oct 2011
    Beans
    10

    [Solved] Prevent mysql starting on boot

    Hi everyone,

    I have mysql-server installed, but would prefer it not be started at boot time (I only need it when doing development work). I can't seem to work out how to tell Ubuntu (11.10) NOT to start it at boot though. I've looked though the /etc/rc*.d directories to no avail. I've tried installing BUM and using that but it already thinks mysql ISN'T started at boot.

    Rather confusing!

    Give a chap a hand?

    Thanks!
    Last edited by endontoddy; October 18th, 2011 at 09:07 PM. Reason: Problem has been solved

  2. #2
    Join Date
    Apr 2009
    Location
    Houston, TX
    Beans
    916
    Distro
    Ubuntu Development Release

    Re: Prevent mysql starting on boot

    When you say that you have it installed, did you install Ubuntu server, or install LAMP, or MySQL manually, or what? Shorter question: How was MySQL installed?

  3. #3
    Join Date
    Oct 2011
    Beans
    10

    Re: Prevent mysql starting on boot

    I mean I installed the mysql-server package myself post-os-installation via apt

  4. #4
    Join Date
    Apr 2009
    Location
    Houston, TX
    Beans
    916
    Distro
    Ubuntu Development Release

    Re: Prevent mysql starting on boot

    Let me boot into my Ubuntu, but I thought there was a way to tell MySQLd not to start on boot, let me verify and then edit this post. May take a couple of minutes.

  5. #5
    Join Date
    Oct 2011
    Beans
    10

    Re: Prevent mysql starting on boot

    *BUMP*

    Anyone? I'm sure it is something simple!

  6. #6
    Join Date
    Jun 2011
    Location
    Atlanta Georgia
    Beans
    1,769
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Prevent mysql starting on boot

    The following can be used to prevent a service from starting at boot time

    Code:
    sudo update-rc.d -f mysql remove
    You can then just start it when needed using

    Code:
    sudo /etc/init.d/mysql start
    hope that helps.

  7. #7
    Join Date
    Oct 2011
    Beans
    10

    Re: Prevent mysql starting on boot

    Thanks but unfortunately that doesn't seem to work. After running that command and rebooting, if I run:

    Code:
    ps aux | grep mysql
    I get:
    Code:
    mysql      876  0.4  2.5 137644 17848 ?        Ssl  20:13   0:00 /usr/sbin/mysqld
    Rather annoyingly still there. It doesn't seem to exist in the rc*.d directories, where else could a command be auto run at boot from?

  8. #8
    Join Date
    Jun 2011
    Location
    Atlanta Georgia
    Beans
    1,769
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Prevent mysql starting on boot

    Quote Originally Posted by endontoddy View Post
    Thanks but unfortunately that doesn't seem to work. After running that command and rebooting, if I run:

    Code:
    ps aux | grep mysql
    I get:
    Code:
    mysql      876  0.4  2.5 137644 17848 ?        Ssl  20:13   0:00 /usr/sbin/mysqld
    Rather annoyingly still there. It doesn't seem to exist in the rc*.d directories, where else could a command be auto run at boot from?
    It's probably been converted to an upstart job you can stop it from starting automatically via upstart this way

    Code:
    sudo nano /etc/init/mysql.conf
    Change the following
    Code:
    start on (net-device-up
              and local-filesystems
          and runlevel [2345])
    stop on runlevel [016]
    to

    Code:
    start on never
    stop on runlevel [016]
    Hope that helps.

  9. #9
    Join Date
    Oct 2011
    Beans
    10

    Re: Prevent mysql starting on boot

    That's done the trick!

  10. #10
    Join Date
    Oct 2011
    Beans
    2

    Re: Prevent mysql starting on boot

    IMHO, a better solution is:

    - open a terminal
    - log-in as root
    - digit:
    Code:
    echo manual >> /etc/init/mysql.override
    here the source.

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
  •