Disable MySQL startup in Ubuntu 10.04

38,413

Ubuntu 10.04 has abandoned SysV init script approach to booting the system.

This link explains - http://www.linuxplanet.com/linuxplanet/tutorials/7033/1/

To prevent mysql from starting on boot

  • 1 go to the /etc/init directory
  • 2. open the mysql.conf file
  • 3. comment out the "start on" line near the top of the file, the "start on" might be spread across two lines, so comment out both

If you want to manually start mysql, use the following command -

  service mysql start
Share:
38,413

Related videos on Youtube

bryan
Author by

bryan

.

Updated on September 17, 2022

Comments

  • bryan
    bryan over 1 year

    I want to prevent MySQL from starting in Ubuntu 10.04

    I have used

    update-rc.d -f mysql remove
    

    and confirmed that there is no link to the /etc/inid.d/mysql script from any of the rc?.d directories.

    I also ran sysv-rc-conf and it shows me that MySQL is NOT being called as part of the rc.d scripts.

    It is still starting on boot. How do I disable it?

    • bryan
      bryan about 14 years
      mysqld is running under the mysql user account
  • bryan
    bryan about 14 years
    The link is fixed, and the answer is correct.
  • A B
    A B about 12 years
    /etc/init/ and /etc/init.d/ are NOT the same! I can't downvote this because I don't have the reputation, and I can't edit it because it's only a two-character change.
  • dhulihan
    dhulihan about 12 years
    @alberge - I made the edit. Waiting on peer review.
  • nh2
    nh2 over 11 years
    Instead of modifying the original .conf file, better use override files: (as root)# echo "manual" >> /etc/init/mysql.override