How do I disable MySQL on Linux from starting on boot or statup?












1















After adding MySQL to Ubuntu, it automatically starts up on server boot. I would like it to not start up with the system.



How can I disable it and manually start it?










share|improve this question



























    1















    After adding MySQL to Ubuntu, it automatically starts up on server boot. I would like it to not start up with the system.



    How can I disable it and manually start it?










    share|improve this question

























      1












      1








      1








      After adding MySQL to Ubuntu, it automatically starts up on server boot. I would like it to not start up with the system.



      How can I disable it and manually start it?










      share|improve this question














      After adding MySQL to Ubuntu, it automatically starts up on server boot. I would like it to not start up with the system.



      How can I disable it and manually start it?







      mysql mariadb linux ubuntu






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 3 '18 at 2:56









      Evan CarrollEvan Carroll

      32.9k1072225




      32.9k1072225






















          2 Answers
          2






          active

          oldest

          votes


















          1














          MariaDB use systemd as does MySQL. To disable MySQL or MariaDB, from starting on bootup, run



          systemctl list-unit-files '*mariadb*' '*mysql*'


          If you see mysql.service, try disabling that one first.



          sudo systemctl disable mysql


          Now you can start and stop MySQL with



          sudo systemctl stop mysql.service
          sudo systemctl start mysql.service





          share|improve this answer


























          • You can always compile it from source and script the startup/shutdown. I like the fine-grained control this gives. I needed it for College where the only way I could run MySQL was to compile it and run it myself (no superuser privileges for me :-) )

            – Vérace
            Jun 3 '18 at 6:20



















          0














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






          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: "182"
            };
            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: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2fdba.stackexchange.com%2fquestions%2f208612%2fhow-do-i-disable-mysql-on-linux-from-starting-on-boot-or-statup%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            MariaDB use systemd as does MySQL. To disable MySQL or MariaDB, from starting on bootup, run



            systemctl list-unit-files '*mariadb*' '*mysql*'


            If you see mysql.service, try disabling that one first.



            sudo systemctl disable mysql


            Now you can start and stop MySQL with



            sudo systemctl stop mysql.service
            sudo systemctl start mysql.service





            share|improve this answer


























            • You can always compile it from source and script the startup/shutdown. I like the fine-grained control this gives. I needed it for College where the only way I could run MySQL was to compile it and run it myself (no superuser privileges for me :-) )

              – Vérace
              Jun 3 '18 at 6:20
















            1














            MariaDB use systemd as does MySQL. To disable MySQL or MariaDB, from starting on bootup, run



            systemctl list-unit-files '*mariadb*' '*mysql*'


            If you see mysql.service, try disabling that one first.



            sudo systemctl disable mysql


            Now you can start and stop MySQL with



            sudo systemctl stop mysql.service
            sudo systemctl start mysql.service





            share|improve this answer


























            • You can always compile it from source and script the startup/shutdown. I like the fine-grained control this gives. I needed it for College where the only way I could run MySQL was to compile it and run it myself (no superuser privileges for me :-) )

              – Vérace
              Jun 3 '18 at 6:20














            1












            1








            1







            MariaDB use systemd as does MySQL. To disable MySQL or MariaDB, from starting on bootup, run



            systemctl list-unit-files '*mariadb*' '*mysql*'


            If you see mysql.service, try disabling that one first.



            sudo systemctl disable mysql


            Now you can start and stop MySQL with



            sudo systemctl stop mysql.service
            sudo systemctl start mysql.service





            share|improve this answer















            MariaDB use systemd as does MySQL. To disable MySQL or MariaDB, from starting on bootup, run



            systemctl list-unit-files '*mariadb*' '*mysql*'


            If you see mysql.service, try disabling that one first.



            sudo systemctl disable mysql


            Now you can start and stop MySQL with



            sudo systemctl stop mysql.service
            sudo systemctl start mysql.service






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jun 28 '18 at 22:38

























            answered Jun 3 '18 at 2:56









            Evan CarrollEvan Carroll

            32.9k1072225




            32.9k1072225













            • You can always compile it from source and script the startup/shutdown. I like the fine-grained control this gives. I needed it for College where the only way I could run MySQL was to compile it and run it myself (no superuser privileges for me :-) )

              – Vérace
              Jun 3 '18 at 6:20



















            • You can always compile it from source and script the startup/shutdown. I like the fine-grained control this gives. I needed it for College where the only way I could run MySQL was to compile it and run it myself (no superuser privileges for me :-) )

              – Vérace
              Jun 3 '18 at 6:20

















            You can always compile it from source and script the startup/shutdown. I like the fine-grained control this gives. I needed it for College where the only way I could run MySQL was to compile it and run it myself (no superuser privileges for me :-) )

            – Vérace
            Jun 3 '18 at 6:20





            You can always compile it from source and script the startup/shutdown. I like the fine-grained control this gives. I needed it for College where the only way I could run MySQL was to compile it and run it myself (no superuser privileges for me :-) )

            – Vérace
            Jun 3 '18 at 6:20













            0














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






            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 starting on boot.






              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 starting on boot.






                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 starting on boot.







                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






                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 1 hour ago









                Yossarian42Yossarian42

                1




                1




                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 Database Administrators Stack Exchange!


                    • 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%2fdba.stackexchange.com%2fquestions%2f208612%2fhow-do-i-disable-mysql-on-linux-from-starting-on-boot-or-statup%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

                    ف. موراي أبراهام

                    صرب

                    كأس إنترتوتو