How to stop mysql from running at boot time?












48















Currently, my MySQL server starts on every server boot. For a couple reasons, this is undesirable behavior. Is there a way to disable this behavior?










share|improve this question





























    48















    Currently, my MySQL server starts on every server boot. For a couple reasons, this is undesirable behavior. Is there a way to disable this behavior?










    share|improve this question



























      48












      48








      48


      18






      Currently, my MySQL server starts on every server boot. For a couple reasons, this is undesirable behavior. Is there a way to disable this behavior?










      share|improve this question
















      Currently, my MySQL server starts on every server boot. For a couple reasons, this is undesirable behavior. Is there a way to disable this behavior?







      boot mysql






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 19 '16 at 19:28









      muru

      1




      1










      asked Aug 16 '11 at 21:31









      Иван БишевацИван Бишевац

      85161229




      85161229






















          8 Answers
          8






          active

          oldest

          votes


















          5














          There are two Guis I can think of. From Applications -> Ubuntu Software Center search for "boot up manager". After installing you will find it in the System -> Administration -> BootUP-Manager. Another is Webmin. Webmin uses your browser. After installing point your browser to https://localhost:10000/ Look for services and work it from there.






          share|improve this answer



















          • 2





            This method didn't work for me on 16.04

            – Mostafa Ahangarha
            Mar 22 '17 at 11:29



















          71














          To prevent mysql from starting on boot:




          1. Open the terminal: Ctrl+Alt+T


          2. Open the mysql.conf file: nano /etc/init/mysql.conf


          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. (comment adding # at the beginning)



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



          service mysql start




          Taken liberally from here.






          share|improve this answer





















          • 3





            This is a very usefull answer for more than one initiation at start up.

            – maniat1k
            Mar 22 '12 at 15:26






          • 1





            Tried, I have /usr/sbin/mysqld and /bin/sh /usr/bin/mysqld_safe running. Commented out everything but didn't helped.

            – Emin Mastizada
            Sep 16 '15 at 20:33











          • IMO this is the best answer.

            – simhumileco
            Jul 1 '17 at 19:52













          • in Linux Mint 18.2 Cinnamon I removed /etc/init/mysql.conf with no change. Mysql server still running on startup. @thebugfinder solution worked for me

            – flyingdrifter
            Nov 6 '17 at 14:24



















          66














          Since 15.04 you can simply do:



          sudo systemctl disable mysql





          share|improve this answer





















          • 4





            Indeed. For 15.04, this is the answer you seek.

            – CommandZ
            Dec 3 '15 at 19:03











          • Awesome, finally I found a solution for this! The other methods don't work to me.

            – rneves
            Mar 22 '16 at 13:08











          • I can't start it again, how do I start mysql after the command?

            – rneves
            Mar 22 '16 at 13:21











          • @rneves did you try enable or reenable?

            – thebugfinder
            Apr 12 '16 at 23:48






          • 1





            @thebugfinder I've tried enable, I don't know about reenable, but enable forces me restart the computer to start mysql again

            – rneves
            Apr 13 '16 at 14:56



















          7














          Things have changed quite a bit in Ubuntu now. I think from version 11 onwards.
          MySQL is handled by Upstart while Apache still uses traditional SysV init scripts



          For MySQL, you can use the new override feature in Upstart to modify the starting behaviour:



          sudo echo "manual" >> /etc/init/mysql.override


          For more info, see the section "Disabling a Job from Automatically Starting" in the Upstart Cookbook.



          As Apache still uses the traditional SysV init scripts you can use



          sudo update-rc.d -f apache2 remove


          to remove the links from /etc/rcX.d or, alternatively use



          sudo update-rc.d apache2 disable


          which "disables" the script by changing it from a start script to a stop script. This is reversible by



          sudo update-rc.d apache2 enable




          Most of this information I got from here: https://askubuntu.com/a/40077/24678






          share|improve this answer


























          • If you want to restore the service sudo update-rc.d apache2 defaults

            – bentech
            Jan 17 '18 at 10:20





















          2














          Or if your really laze like me you could just open a Terminal session and then type:



          sudo perl -pi.orig -e 's/starts+on/#starts+on/' /etc/init/mysql.conf && sudo perl -pi.orig -e 's/ands+/#and/g' /etc/init/mysql.conf


          You can then just issue a reboot command then your system will boot-up without mysql started.






          share|improve this answer





















          • 1





            This command could be improved. It is adding a + leaving the line like this: #start+on blahblahblah but it works!

            – Lucio
            Dec 22 '13 at 0:41



















          2














          Actually, there is also another method to accomplish this, via the sysv-rc-conf tool.



          You can install it by typing



          sudo apt-get install sysv-rc-conf


          It allows you to take control over all available services, including running/stopping them in place and configuring services' operation per runlevel.



          Edit: You have to run tis tool as root:



          sudo sysv-rc-conf





          share|improve this answer































            0














            You can use chkconfig tool package



            $ chkconfig --level 345 mysqld off





            share|improve this answer





















            • 2





              Please elaborate your answer. Why do you think this solves the question? You could e.g. add a link to a manual as reference.

              – Byte Commander
              Jul 28 '16 at 22:30



















            0














            In Ubuntu 18.04, sudo systemctl disable mysql will prevent mysql-server from autostarting on boot.



            For linux, there are 3 main init systems: Systemd, Upstart and SysV. Although nearly all Linux systems run on Systemd. The other two init systems might also co-exist in your system.



            For Systemd, use command sudo systemctl disable mysql;

            For Upstart, use echo manual >> /etc/init/mysql.override;

            For SysV, run the following command sudo update-rc.d mysql disable



            If you'd like to find which init system is running on your server, please read this answer.






            share|improve this answer










            New contributor




            Yossarian42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "89"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f57381%2fhow-to-stop-mysql-from-running-at-boot-time%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              8 Answers
              8






              active

              oldest

              votes








              8 Answers
              8






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              5














              There are two Guis I can think of. From Applications -> Ubuntu Software Center search for "boot up manager". After installing you will find it in the System -> Administration -> BootUP-Manager. Another is Webmin. Webmin uses your browser. After installing point your browser to https://localhost:10000/ Look for services and work it from there.






              share|improve this answer



















              • 2





                This method didn't work for me on 16.04

                – Mostafa Ahangarha
                Mar 22 '17 at 11:29
















              5














              There are two Guis I can think of. From Applications -> Ubuntu Software Center search for "boot up manager". After installing you will find it in the System -> Administration -> BootUP-Manager. Another is Webmin. Webmin uses your browser. After installing point your browser to https://localhost:10000/ Look for services and work it from there.






              share|improve this answer



















              • 2





                This method didn't work for me on 16.04

                – Mostafa Ahangarha
                Mar 22 '17 at 11:29














              5












              5








              5







              There are two Guis I can think of. From Applications -> Ubuntu Software Center search for "boot up manager". After installing you will find it in the System -> Administration -> BootUP-Manager. Another is Webmin. Webmin uses your browser. After installing point your browser to https://localhost:10000/ Look for services and work it from there.






              share|improve this answer













              There are two Guis I can think of. From Applications -> Ubuntu Software Center search for "boot up manager". After installing you will find it in the System -> Administration -> BootUP-Manager. Another is Webmin. Webmin uses your browser. After installing point your browser to https://localhost:10000/ Look for services and work it from there.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Aug 16 '11 at 23:20









              peckpeck

              711411




              711411








              • 2





                This method didn't work for me on 16.04

                – Mostafa Ahangarha
                Mar 22 '17 at 11:29














              • 2





                This method didn't work for me on 16.04

                – Mostafa Ahangarha
                Mar 22 '17 at 11:29








              2




              2





              This method didn't work for me on 16.04

              – Mostafa Ahangarha
              Mar 22 '17 at 11:29





              This method didn't work for me on 16.04

              – Mostafa Ahangarha
              Mar 22 '17 at 11:29













              71














              To prevent mysql from starting on boot:




              1. Open the terminal: Ctrl+Alt+T


              2. Open the mysql.conf file: nano /etc/init/mysql.conf


              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. (comment adding # at the beginning)



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



              service mysql start




              Taken liberally from here.






              share|improve this answer





















              • 3





                This is a very usefull answer for more than one initiation at start up.

                – maniat1k
                Mar 22 '12 at 15:26






              • 1





                Tried, I have /usr/sbin/mysqld and /bin/sh /usr/bin/mysqld_safe running. Commented out everything but didn't helped.

                – Emin Mastizada
                Sep 16 '15 at 20:33











              • IMO this is the best answer.

                – simhumileco
                Jul 1 '17 at 19:52













              • in Linux Mint 18.2 Cinnamon I removed /etc/init/mysql.conf with no change. Mysql server still running on startup. @thebugfinder solution worked for me

                – flyingdrifter
                Nov 6 '17 at 14:24
















              71














              To prevent mysql from starting on boot:




              1. Open the terminal: Ctrl+Alt+T


              2. Open the mysql.conf file: nano /etc/init/mysql.conf


              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. (comment adding # at the beginning)



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



              service mysql start




              Taken liberally from here.






              share|improve this answer





















              • 3





                This is a very usefull answer for more than one initiation at start up.

                – maniat1k
                Mar 22 '12 at 15:26






              • 1





                Tried, I have /usr/sbin/mysqld and /bin/sh /usr/bin/mysqld_safe running. Commented out everything but didn't helped.

                – Emin Mastizada
                Sep 16 '15 at 20:33











              • IMO this is the best answer.

                – simhumileco
                Jul 1 '17 at 19:52













              • in Linux Mint 18.2 Cinnamon I removed /etc/init/mysql.conf with no change. Mysql server still running on startup. @thebugfinder solution worked for me

                – flyingdrifter
                Nov 6 '17 at 14:24














              71












              71








              71







              To prevent mysql from starting on boot:




              1. Open the terminal: Ctrl+Alt+T


              2. Open the mysql.conf file: nano /etc/init/mysql.conf


              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. (comment adding # at the beginning)



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



              service mysql start




              Taken liberally from here.






              share|improve this answer















              To prevent mysql from starting on boot:




              1. Open the terminal: Ctrl+Alt+T


              2. Open the mysql.conf file: nano /etc/init/mysql.conf


              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. (comment adding # at the beginning)



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



              service mysql start




              Taken liberally from here.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Mar 20 '17 at 10:18









              Community

              1




              1










              answered Aug 16 '11 at 21:46









              Kris HarperKris Harper

              9,669114771




              9,669114771








              • 3





                This is a very usefull answer for more than one initiation at start up.

                – maniat1k
                Mar 22 '12 at 15:26






              • 1





                Tried, I have /usr/sbin/mysqld and /bin/sh /usr/bin/mysqld_safe running. Commented out everything but didn't helped.

                – Emin Mastizada
                Sep 16 '15 at 20:33











              • IMO this is the best answer.

                – simhumileco
                Jul 1 '17 at 19:52













              • in Linux Mint 18.2 Cinnamon I removed /etc/init/mysql.conf with no change. Mysql server still running on startup. @thebugfinder solution worked for me

                – flyingdrifter
                Nov 6 '17 at 14:24














              • 3





                This is a very usefull answer for more than one initiation at start up.

                – maniat1k
                Mar 22 '12 at 15:26






              • 1





                Tried, I have /usr/sbin/mysqld and /bin/sh /usr/bin/mysqld_safe running. Commented out everything but didn't helped.

                – Emin Mastizada
                Sep 16 '15 at 20:33











              • IMO this is the best answer.

                – simhumileco
                Jul 1 '17 at 19:52













              • in Linux Mint 18.2 Cinnamon I removed /etc/init/mysql.conf with no change. Mysql server still running on startup. @thebugfinder solution worked for me

                – flyingdrifter
                Nov 6 '17 at 14:24








              3




              3





              This is a very usefull answer for more than one initiation at start up.

              – maniat1k
              Mar 22 '12 at 15:26





              This is a very usefull answer for more than one initiation at start up.

              – maniat1k
              Mar 22 '12 at 15:26




              1




              1





              Tried, I have /usr/sbin/mysqld and /bin/sh /usr/bin/mysqld_safe running. Commented out everything but didn't helped.

              – Emin Mastizada
              Sep 16 '15 at 20:33





              Tried, I have /usr/sbin/mysqld and /bin/sh /usr/bin/mysqld_safe running. Commented out everything but didn't helped.

              – Emin Mastizada
              Sep 16 '15 at 20:33













              IMO this is the best answer.

              – simhumileco
              Jul 1 '17 at 19:52







              IMO this is the best answer.

              – simhumileco
              Jul 1 '17 at 19:52















              in Linux Mint 18.2 Cinnamon I removed /etc/init/mysql.conf with no change. Mysql server still running on startup. @thebugfinder solution worked for me

              – flyingdrifter
              Nov 6 '17 at 14:24





              in Linux Mint 18.2 Cinnamon I removed /etc/init/mysql.conf with no change. Mysql server still running on startup. @thebugfinder solution worked for me

              – flyingdrifter
              Nov 6 '17 at 14:24











              66














              Since 15.04 you can simply do:



              sudo systemctl disable mysql





              share|improve this answer





















              • 4





                Indeed. For 15.04, this is the answer you seek.

                – CommandZ
                Dec 3 '15 at 19:03











              • Awesome, finally I found a solution for this! The other methods don't work to me.

                – rneves
                Mar 22 '16 at 13:08











              • I can't start it again, how do I start mysql after the command?

                – rneves
                Mar 22 '16 at 13:21











              • @rneves did you try enable or reenable?

                – thebugfinder
                Apr 12 '16 at 23:48






              • 1





                @thebugfinder I've tried enable, I don't know about reenable, but enable forces me restart the computer to start mysql again

                – rneves
                Apr 13 '16 at 14:56
















              66














              Since 15.04 you can simply do:



              sudo systemctl disable mysql





              share|improve this answer





















              • 4





                Indeed. For 15.04, this is the answer you seek.

                – CommandZ
                Dec 3 '15 at 19:03











              • Awesome, finally I found a solution for this! The other methods don't work to me.

                – rneves
                Mar 22 '16 at 13:08











              • I can't start it again, how do I start mysql after the command?

                – rneves
                Mar 22 '16 at 13:21











              • @rneves did you try enable or reenable?

                – thebugfinder
                Apr 12 '16 at 23:48






              • 1





                @thebugfinder I've tried enable, I don't know about reenable, but enable forces me restart the computer to start mysql again

                – rneves
                Apr 13 '16 at 14:56














              66












              66








              66







              Since 15.04 you can simply do:



              sudo systemctl disable mysql





              share|improve this answer















              Since 15.04 you can simply do:



              sudo systemctl disable mysql






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Sep 19 '16 at 19:28









              muru

              1




              1










              answered Aug 4 '15 at 13:24









              thebugfinderthebugfinder

              1,26179




              1,26179








              • 4





                Indeed. For 15.04, this is the answer you seek.

                – CommandZ
                Dec 3 '15 at 19:03











              • Awesome, finally I found a solution for this! The other methods don't work to me.

                – rneves
                Mar 22 '16 at 13:08











              • I can't start it again, how do I start mysql after the command?

                – rneves
                Mar 22 '16 at 13:21











              • @rneves did you try enable or reenable?

                – thebugfinder
                Apr 12 '16 at 23:48






              • 1





                @thebugfinder I've tried enable, I don't know about reenable, but enable forces me restart the computer to start mysql again

                – rneves
                Apr 13 '16 at 14:56














              • 4





                Indeed. For 15.04, this is the answer you seek.

                – CommandZ
                Dec 3 '15 at 19:03











              • Awesome, finally I found a solution for this! The other methods don't work to me.

                – rneves
                Mar 22 '16 at 13:08











              • I can't start it again, how do I start mysql after the command?

                – rneves
                Mar 22 '16 at 13:21











              • @rneves did you try enable or reenable?

                – thebugfinder
                Apr 12 '16 at 23:48






              • 1





                @thebugfinder I've tried enable, I don't know about reenable, but enable forces me restart the computer to start mysql again

                – rneves
                Apr 13 '16 at 14:56








              4




              4





              Indeed. For 15.04, this is the answer you seek.

              – CommandZ
              Dec 3 '15 at 19:03





              Indeed. For 15.04, this is the answer you seek.

              – CommandZ
              Dec 3 '15 at 19:03













              Awesome, finally I found a solution for this! The other methods don't work to me.

              – rneves
              Mar 22 '16 at 13:08





              Awesome, finally I found a solution for this! The other methods don't work to me.

              – rneves
              Mar 22 '16 at 13:08













              I can't start it again, how do I start mysql after the command?

              – rneves
              Mar 22 '16 at 13:21





              I can't start it again, how do I start mysql after the command?

              – rneves
              Mar 22 '16 at 13:21













              @rneves did you try enable or reenable?

              – thebugfinder
              Apr 12 '16 at 23:48





              @rneves did you try enable or reenable?

              – thebugfinder
              Apr 12 '16 at 23:48




              1




              1





              @thebugfinder I've tried enable, I don't know about reenable, but enable forces me restart the computer to start mysql again

              – rneves
              Apr 13 '16 at 14:56





              @thebugfinder I've tried enable, I don't know about reenable, but enable forces me restart the computer to start mysql again

              – rneves
              Apr 13 '16 at 14:56











              7














              Things have changed quite a bit in Ubuntu now. I think from version 11 onwards.
              MySQL is handled by Upstart while Apache still uses traditional SysV init scripts



              For MySQL, you can use the new override feature in Upstart to modify the starting behaviour:



              sudo echo "manual" >> /etc/init/mysql.override


              For more info, see the section "Disabling a Job from Automatically Starting" in the Upstart Cookbook.



              As Apache still uses the traditional SysV init scripts you can use



              sudo update-rc.d -f apache2 remove


              to remove the links from /etc/rcX.d or, alternatively use



              sudo update-rc.d apache2 disable


              which "disables" the script by changing it from a start script to a stop script. This is reversible by



              sudo update-rc.d apache2 enable




              Most of this information I got from here: https://askubuntu.com/a/40077/24678






              share|improve this answer


























              • If you want to restore the service sudo update-rc.d apache2 defaults

                – bentech
                Jan 17 '18 at 10:20


















              7














              Things have changed quite a bit in Ubuntu now. I think from version 11 onwards.
              MySQL is handled by Upstart while Apache still uses traditional SysV init scripts



              For MySQL, you can use the new override feature in Upstart to modify the starting behaviour:



              sudo echo "manual" >> /etc/init/mysql.override


              For more info, see the section "Disabling a Job from Automatically Starting" in the Upstart Cookbook.



              As Apache still uses the traditional SysV init scripts you can use



              sudo update-rc.d -f apache2 remove


              to remove the links from /etc/rcX.d or, alternatively use



              sudo update-rc.d apache2 disable


              which "disables" the script by changing it from a start script to a stop script. This is reversible by



              sudo update-rc.d apache2 enable




              Most of this information I got from here: https://askubuntu.com/a/40077/24678






              share|improve this answer


























              • If you want to restore the service sudo update-rc.d apache2 defaults

                – bentech
                Jan 17 '18 at 10:20
















              7












              7








              7







              Things have changed quite a bit in Ubuntu now. I think from version 11 onwards.
              MySQL is handled by Upstart while Apache still uses traditional SysV init scripts



              For MySQL, you can use the new override feature in Upstart to modify the starting behaviour:



              sudo echo "manual" >> /etc/init/mysql.override


              For more info, see the section "Disabling a Job from Automatically Starting" in the Upstart Cookbook.



              As Apache still uses the traditional SysV init scripts you can use



              sudo update-rc.d -f apache2 remove


              to remove the links from /etc/rcX.d or, alternatively use



              sudo update-rc.d apache2 disable


              which "disables" the script by changing it from a start script to a stop script. This is reversible by



              sudo update-rc.d apache2 enable




              Most of this information I got from here: https://askubuntu.com/a/40077/24678






              share|improve this answer















              Things have changed quite a bit in Ubuntu now. I think from version 11 onwards.
              MySQL is handled by Upstart while Apache still uses traditional SysV init scripts



              For MySQL, you can use the new override feature in Upstart to modify the starting behaviour:



              sudo echo "manual" >> /etc/init/mysql.override


              For more info, see the section "Disabling a Job from Automatically Starting" in the Upstart Cookbook.



              As Apache still uses the traditional SysV init scripts you can use



              sudo update-rc.d -f apache2 remove


              to remove the links from /etc/rcX.d or, alternatively use



              sudo update-rc.d apache2 disable


              which "disables" the script by changing it from a start script to a stop script. This is reversible by



              sudo update-rc.d apache2 enable




              Most of this information I got from here: https://askubuntu.com/a/40077/24678







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Apr 13 '17 at 12:23









              Community

              1




              1










              answered Sep 10 '13 at 13:19









              WavesailorWavesailor

              320147




              320147













              • If you want to restore the service sudo update-rc.d apache2 defaults

                – bentech
                Jan 17 '18 at 10:20





















              • If you want to restore the service sudo update-rc.d apache2 defaults

                – bentech
                Jan 17 '18 at 10:20



















              If you want to restore the service sudo update-rc.d apache2 defaults

              – bentech
              Jan 17 '18 at 10:20







              If you want to restore the service sudo update-rc.d apache2 defaults

              – bentech
              Jan 17 '18 at 10:20













              2














              Or if your really laze like me you could just open a Terminal session and then type:



              sudo perl -pi.orig -e 's/starts+on/#starts+on/' /etc/init/mysql.conf && sudo perl -pi.orig -e 's/ands+/#and/g' /etc/init/mysql.conf


              You can then just issue a reboot command then your system will boot-up without mysql started.






              share|improve this answer





















              • 1





                This command could be improved. It is adding a + leaving the line like this: #start+on blahblahblah but it works!

                – Lucio
                Dec 22 '13 at 0:41
















              2














              Or if your really laze like me you could just open a Terminal session and then type:



              sudo perl -pi.orig -e 's/starts+on/#starts+on/' /etc/init/mysql.conf && sudo perl -pi.orig -e 's/ands+/#and/g' /etc/init/mysql.conf


              You can then just issue a reboot command then your system will boot-up without mysql started.






              share|improve this answer





















              • 1





                This command could be improved. It is adding a + leaving the line like this: #start+on blahblahblah but it works!

                – Lucio
                Dec 22 '13 at 0:41














              2












              2








              2







              Or if your really laze like me you could just open a Terminal session and then type:



              sudo perl -pi.orig -e 's/starts+on/#starts+on/' /etc/init/mysql.conf && sudo perl -pi.orig -e 's/ands+/#and/g' /etc/init/mysql.conf


              You can then just issue a reboot command then your system will boot-up without mysql started.






              share|improve this answer















              Or if your really laze like me you could just open a Terminal session and then type:



              sudo perl -pi.orig -e 's/starts+on/#starts+on/' /etc/init/mysql.conf && sudo perl -pi.orig -e 's/ands+/#and/g' /etc/init/mysql.conf


              You can then just issue a reboot command then your system will boot-up without mysql started.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Aug 16 '11 at 23:19









              Jorge Castro

              36.9k106422617




              36.9k106422617










              answered Aug 16 '11 at 23:04









              Justin AndruskJustin Andrusk

              3,46511416




              3,46511416








              • 1





                This command could be improved. It is adding a + leaving the line like this: #start+on blahblahblah but it works!

                – Lucio
                Dec 22 '13 at 0:41














              • 1





                This command could be improved. It is adding a + leaving the line like this: #start+on blahblahblah but it works!

                – Lucio
                Dec 22 '13 at 0:41








              1




              1





              This command could be improved. It is adding a + leaving the line like this: #start+on blahblahblah but it works!

              – Lucio
              Dec 22 '13 at 0:41





              This command could be improved. It is adding a + leaving the line like this: #start+on blahblahblah but it works!

              – Lucio
              Dec 22 '13 at 0:41











              2














              Actually, there is also another method to accomplish this, via the sysv-rc-conf tool.



              You can install it by typing



              sudo apt-get install sysv-rc-conf


              It allows you to take control over all available services, including running/stopping them in place and configuring services' operation per runlevel.



              Edit: You have to run tis tool as root:



              sudo sysv-rc-conf





              share|improve this answer




























                2














                Actually, there is also another method to accomplish this, via the sysv-rc-conf tool.



                You can install it by typing



                sudo apt-get install sysv-rc-conf


                It allows you to take control over all available services, including running/stopping them in place and configuring services' operation per runlevel.



                Edit: You have to run tis tool as root:



                sudo sysv-rc-conf





                share|improve this answer


























                  2












                  2








                  2







                  Actually, there is also another method to accomplish this, via the sysv-rc-conf tool.



                  You can install it by typing



                  sudo apt-get install sysv-rc-conf


                  It allows you to take control over all available services, including running/stopping them in place and configuring services' operation per runlevel.



                  Edit: You have to run tis tool as root:



                  sudo sysv-rc-conf





                  share|improve this answer













                  Actually, there is also another method to accomplish this, via the sysv-rc-conf tool.



                  You can install it by typing



                  sudo apt-get install sysv-rc-conf


                  It allows you to take control over all available services, including running/stopping them in place and configuring services' operation per runlevel.



                  Edit: You have to run tis tool as root:



                  sudo sysv-rc-conf






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 10 '13 at 13:29









                  errikoserrikos

                  8391718




                  8391718























                      0














                      You can use chkconfig tool package



                      $ chkconfig --level 345 mysqld off





                      share|improve this answer





















                      • 2





                        Please elaborate your answer. Why do you think this solves the question? You could e.g. add a link to a manual as reference.

                        – Byte Commander
                        Jul 28 '16 at 22:30
















                      0














                      You can use chkconfig tool package



                      $ chkconfig --level 345 mysqld off





                      share|improve this answer





















                      • 2





                        Please elaborate your answer. Why do you think this solves the question? You could e.g. add a link to a manual as reference.

                        – Byte Commander
                        Jul 28 '16 at 22:30














                      0












                      0








                      0







                      You can use chkconfig tool package



                      $ chkconfig --level 345 mysqld off





                      share|improve this answer















                      You can use chkconfig tool package



                      $ chkconfig --level 345 mysqld off






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Oct 10 '17 at 6:51









                      RousseauAlexandre

                      1436




                      1436










                      answered Jul 28 '16 at 10:54









                      ThomanThoman

                      109




                      109








                      • 2





                        Please elaborate your answer. Why do you think this solves the question? You could e.g. add a link to a manual as reference.

                        – Byte Commander
                        Jul 28 '16 at 22:30














                      • 2





                        Please elaborate your answer. Why do you think this solves the question? You could e.g. add a link to a manual as reference.

                        – Byte Commander
                        Jul 28 '16 at 22:30








                      2




                      2





                      Please elaborate your answer. Why do you think this solves the question? You could e.g. add a link to a manual as reference.

                      – Byte Commander
                      Jul 28 '16 at 22:30





                      Please elaborate your answer. Why do you think this solves the question? You could e.g. add a link to a manual as reference.

                      – Byte Commander
                      Jul 28 '16 at 22:30











                      0














                      In Ubuntu 18.04, sudo systemctl disable mysql will prevent mysql-server from autostarting on boot.



                      For linux, there are 3 main init systems: Systemd, Upstart and SysV. Although nearly all Linux systems run on Systemd. The other two init systems might also co-exist in your system.



                      For Systemd, use command sudo systemctl disable mysql;

                      For Upstart, use echo manual >> /etc/init/mysql.override;

                      For SysV, run the following command sudo update-rc.d mysql disable



                      If you'd like to find which init system is running on your server, please read this answer.






                      share|improve this answer










                      New contributor




                      Yossarian42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.

























                        0














                        In Ubuntu 18.04, sudo systemctl disable mysql will prevent mysql-server from autostarting on boot.



                        For linux, there are 3 main init systems: Systemd, Upstart and SysV. Although nearly all Linux systems run on Systemd. The other two init systems might also co-exist in your system.



                        For Systemd, use command sudo systemctl disable mysql;

                        For Upstart, use echo manual >> /etc/init/mysql.override;

                        For SysV, run the following command sudo update-rc.d mysql disable



                        If you'd like to find which init system is running on your server, please read this answer.






                        share|improve this answer










                        New contributor




                        Yossarian42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.























                          0












                          0








                          0







                          In Ubuntu 18.04, sudo systemctl disable mysql will prevent mysql-server from autostarting on boot.



                          For linux, there are 3 main init systems: Systemd, Upstart and SysV. Although nearly all Linux systems run on Systemd. The other two init systems might also co-exist in your system.



                          For Systemd, use command sudo systemctl disable mysql;

                          For Upstart, use echo manual >> /etc/init/mysql.override;

                          For SysV, run the following command sudo update-rc.d mysql disable



                          If you'd like to find which init system is running on your server, please read this answer.






                          share|improve this answer










                          New contributor




                          Yossarian42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.










                          In Ubuntu 18.04, sudo systemctl disable mysql will prevent mysql-server from autostarting on boot.



                          For linux, there are 3 main init systems: Systemd, Upstart and SysV. Although nearly all Linux systems run on Systemd. The other two init systems might also co-exist in your system.



                          For Systemd, use command sudo systemctl disable mysql;

                          For Upstart, use echo manual >> /etc/init/mysql.override;

                          For SysV, run the following command sudo update-rc.d mysql disable



                          If you'd like to find which init system is running on your server, please read this answer.







                          share|improve this answer










                          New contributor




                          Yossarian42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          share|improve this answer



                          share|improve this answer








                          edited Mar 10 at 1:06





















                          New contributor




                          Yossarian42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered Mar 10 at 0:17









                          Yossarian42Yossarian42

                          11




                          11




                          New contributor




                          Yossarian42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          Yossarian42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          Yossarian42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Ask Ubuntu!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f57381%2fhow-to-stop-mysql-from-running-at-boot-time%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              數位音樂下載

                              When can things happen in Etherscan, such as the picture below?

                              格利澤436b