How to stop mysqld process?












10















result of ps -e | grep mysqld



enter image description here



running htop and clicking on memory usage..



enter image description here



It is taking 33% of 4gb memory.



I just want to end the mysqld process.. running sudo pkill mysqld ends the process but again the process starts.. I want to completely end it and get the memory back.










share|improve this question




















  • 1





    Press f5 in htop to see what process is starting mysqld

    – Moose
    Sep 27 '14 at 16:28
















10















result of ps -e | grep mysqld



enter image description here



running htop and clicking on memory usage..



enter image description here



It is taking 33% of 4gb memory.



I just want to end the mysqld process.. running sudo pkill mysqld ends the process but again the process starts.. I want to completely end it and get the memory back.










share|improve this question




















  • 1





    Press f5 in htop to see what process is starting mysqld

    – Moose
    Sep 27 '14 at 16:28














10












10








10


4






result of ps -e | grep mysqld



enter image description here



running htop and clicking on memory usage..



enter image description here



It is taking 33% of 4gb memory.



I just want to end the mysqld process.. running sudo pkill mysqld ends the process but again the process starts.. I want to completely end it and get the memory back.










share|improve this question
















result of ps -e | grep mysqld



enter image description here



running htop and clicking on memory usage..



enter image description here



It is taking 33% of 4gb memory.



I just want to end the mysqld process.. running sudo pkill mysqld ends the process but again the process starts.. I want to completely end it and get the memory back.







14.04 mysql process






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 27 '14 at 16:27









αғsнιη

24.7k2396158




24.7k2396158










asked Sep 27 '14 at 16:17









Manoj BharadwajManoj Bharadwaj

55117




55117








  • 1





    Press f5 in htop to see what process is starting mysqld

    – Moose
    Sep 27 '14 at 16:28














  • 1





    Press f5 in htop to see what process is starting mysqld

    – Moose
    Sep 27 '14 at 16:28








1




1





Press f5 in htop to see what process is starting mysqld

– Moose
Sep 27 '14 at 16:28





Press f5 in htop to see what process is starting mysqld

– Moose
Sep 27 '14 at 16:28










6 Answers
6






active

oldest

votes


















11














The mysql Upstart configuration has the respawn option:



$ grep respawn /etc/init/mysql.conf
respawn
respawn limit 2 5
elif echo $statusnow | grep -q 'respawn/' ; then


The respawn option tells Upstart to restart the process if it exits or is killed.
The limit is 2, so you can try killing of the processes twice, which will tell Upstart not to start them again, or use:



sudo service mysql stop





share|improve this answer
























  • mysql stop stops it, and yet it still starts again and again... I commented out respawn rows in the configuration, but that didn't help.

    – Jānis Elmeris
    Jul 10 '16 at 12:36






  • 1





    @Janis if service mysql stops mysql, and then it restarts, then something else is starting it. Look for cronjobs or monitoring scripts or something.

    – muru
    Jul 10 '16 at 12:45











  • Thanks! I did the stopping by /etc/init.d/mysql stop, but it turned out that I had to run service mysql stop instead. I thought that they are the same (one calling the other or both calling the same command).

    – Jānis Elmeris
    Jul 13 '16 at 15:20



















12














/etc/init.d/mysql stop
service mysql stop
killall -KILL mysql mysqld_safe mysqld


When you see the following information, you success



mysql: no process found
mysqld_safe: no process found
mysqld: no process found


I use this to solve the installation problem of MySQL 5.6 in Ubuntu 15.10 using this link.



During this installation, I encounter the problem saying:



mysqld_safe A mysqld process already exists


Just completely stop the mysqld, mysqld_safe, mysql solves the problem






share|improve this answer

































    3














    Run sudo /etc/init.d/mysql stop






    share|improve this answer































      1














      Somehow all the answers couldn't help me until I first restarted the server then stopped it, so here are the steps:



      sudo /etc/init.d/mysql restart

      sudo /etc/init.d/mysql stop


      This worked in Ubuntu WSL.






      share|improve this answer



















      • 1





        duplicate of this answer askubuntu.com/a/771591/790920

        – abu_bua
        Aug 9 '18 at 11:35











      • @abu_bua I tried the steps he put there and it still didn't work for me until I restarted and then stropped, that's why I have it specific steps in that order if anyone has same problems.

        – Eddy Ekofo
        Aug 9 '18 at 12:24



















      1














      If you cannot find mysql within /etc/init or /etc/init.d, check that id did not come together with another package.
      As for me, i found out that my mysqld runs to support nextcloud, i did



      $> find '/etc' | grep 'mysql'

      /etc/systemd/system/multi-user.target.wants/snap.nextcloud.mysql.service
      /etc/systemd/system/snap.nextcloud.mysql.service
      /etc/apparmor.d/abstractions/mys





      share|improve this answer































        0














        If you are stuck in a running commang inside the console, you can try one of the following.




        • Ctrl + c

        • Ctrl + q

        • F10

        • type "exit" + Enter

        • Esc






        share|improve this answer























          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%2f529302%2fhow-to-stop-mysqld-process%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          6 Answers
          6






          active

          oldest

          votes








          6 Answers
          6






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          11














          The mysql Upstart configuration has the respawn option:



          $ grep respawn /etc/init/mysql.conf
          respawn
          respawn limit 2 5
          elif echo $statusnow | grep -q 'respawn/' ; then


          The respawn option tells Upstart to restart the process if it exits or is killed.
          The limit is 2, so you can try killing of the processes twice, which will tell Upstart not to start them again, or use:



          sudo service mysql stop





          share|improve this answer
























          • mysql stop stops it, and yet it still starts again and again... I commented out respawn rows in the configuration, but that didn't help.

            – Jānis Elmeris
            Jul 10 '16 at 12:36






          • 1





            @Janis if service mysql stops mysql, and then it restarts, then something else is starting it. Look for cronjobs or monitoring scripts or something.

            – muru
            Jul 10 '16 at 12:45











          • Thanks! I did the stopping by /etc/init.d/mysql stop, but it turned out that I had to run service mysql stop instead. I thought that they are the same (one calling the other or both calling the same command).

            – Jānis Elmeris
            Jul 13 '16 at 15:20
















          11














          The mysql Upstart configuration has the respawn option:



          $ grep respawn /etc/init/mysql.conf
          respawn
          respawn limit 2 5
          elif echo $statusnow | grep -q 'respawn/' ; then


          The respawn option tells Upstart to restart the process if it exits or is killed.
          The limit is 2, so you can try killing of the processes twice, which will tell Upstart not to start them again, or use:



          sudo service mysql stop





          share|improve this answer
























          • mysql stop stops it, and yet it still starts again and again... I commented out respawn rows in the configuration, but that didn't help.

            – Jānis Elmeris
            Jul 10 '16 at 12:36






          • 1





            @Janis if service mysql stops mysql, and then it restarts, then something else is starting it. Look for cronjobs or monitoring scripts or something.

            – muru
            Jul 10 '16 at 12:45











          • Thanks! I did the stopping by /etc/init.d/mysql stop, but it turned out that I had to run service mysql stop instead. I thought that they are the same (one calling the other or both calling the same command).

            – Jānis Elmeris
            Jul 13 '16 at 15:20














          11












          11








          11







          The mysql Upstart configuration has the respawn option:



          $ grep respawn /etc/init/mysql.conf
          respawn
          respawn limit 2 5
          elif echo $statusnow | grep -q 'respawn/' ; then


          The respawn option tells Upstart to restart the process if it exits or is killed.
          The limit is 2, so you can try killing of the processes twice, which will tell Upstart not to start them again, or use:



          sudo service mysql stop





          share|improve this answer













          The mysql Upstart configuration has the respawn option:



          $ grep respawn /etc/init/mysql.conf
          respawn
          respawn limit 2 5
          elif echo $statusnow | grep -q 'respawn/' ; then


          The respawn option tells Upstart to restart the process if it exits or is killed.
          The limit is 2, so you can try killing of the processes twice, which will tell Upstart not to start them again, or use:



          sudo service mysql stop






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 27 '14 at 16:28









          murumuru

          1




          1













          • mysql stop stops it, and yet it still starts again and again... I commented out respawn rows in the configuration, but that didn't help.

            – Jānis Elmeris
            Jul 10 '16 at 12:36






          • 1





            @Janis if service mysql stops mysql, and then it restarts, then something else is starting it. Look for cronjobs or monitoring scripts or something.

            – muru
            Jul 10 '16 at 12:45











          • Thanks! I did the stopping by /etc/init.d/mysql stop, but it turned out that I had to run service mysql stop instead. I thought that they are the same (one calling the other or both calling the same command).

            – Jānis Elmeris
            Jul 13 '16 at 15:20



















          • mysql stop stops it, and yet it still starts again and again... I commented out respawn rows in the configuration, but that didn't help.

            – Jānis Elmeris
            Jul 10 '16 at 12:36






          • 1





            @Janis if service mysql stops mysql, and then it restarts, then something else is starting it. Look for cronjobs or monitoring scripts or something.

            – muru
            Jul 10 '16 at 12:45











          • Thanks! I did the stopping by /etc/init.d/mysql stop, but it turned out that I had to run service mysql stop instead. I thought that they are the same (one calling the other or both calling the same command).

            – Jānis Elmeris
            Jul 13 '16 at 15:20

















          mysql stop stops it, and yet it still starts again and again... I commented out respawn rows in the configuration, but that didn't help.

          – Jānis Elmeris
          Jul 10 '16 at 12:36





          mysql stop stops it, and yet it still starts again and again... I commented out respawn rows in the configuration, but that didn't help.

          – Jānis Elmeris
          Jul 10 '16 at 12:36




          1




          1





          @Janis if service mysql stops mysql, and then it restarts, then something else is starting it. Look for cronjobs or monitoring scripts or something.

          – muru
          Jul 10 '16 at 12:45





          @Janis if service mysql stops mysql, and then it restarts, then something else is starting it. Look for cronjobs or monitoring scripts or something.

          – muru
          Jul 10 '16 at 12:45













          Thanks! I did the stopping by /etc/init.d/mysql stop, but it turned out that I had to run service mysql stop instead. I thought that they are the same (one calling the other or both calling the same command).

          – Jānis Elmeris
          Jul 13 '16 at 15:20





          Thanks! I did the stopping by /etc/init.d/mysql stop, but it turned out that I had to run service mysql stop instead. I thought that they are the same (one calling the other or both calling the same command).

          – Jānis Elmeris
          Jul 13 '16 at 15:20













          12














          /etc/init.d/mysql stop
          service mysql stop
          killall -KILL mysql mysqld_safe mysqld


          When you see the following information, you success



          mysql: no process found
          mysqld_safe: no process found
          mysqld: no process found


          I use this to solve the installation problem of MySQL 5.6 in Ubuntu 15.10 using this link.



          During this installation, I encounter the problem saying:



          mysqld_safe A mysqld process already exists


          Just completely stop the mysqld, mysqld_safe, mysql solves the problem






          share|improve this answer






























            12














            /etc/init.d/mysql stop
            service mysql stop
            killall -KILL mysql mysqld_safe mysqld


            When you see the following information, you success



            mysql: no process found
            mysqld_safe: no process found
            mysqld: no process found


            I use this to solve the installation problem of MySQL 5.6 in Ubuntu 15.10 using this link.



            During this installation, I encounter the problem saying:



            mysqld_safe A mysqld process already exists


            Just completely stop the mysqld, mysqld_safe, mysql solves the problem






            share|improve this answer




























              12












              12








              12







              /etc/init.d/mysql stop
              service mysql stop
              killall -KILL mysql mysqld_safe mysqld


              When you see the following information, you success



              mysql: no process found
              mysqld_safe: no process found
              mysqld: no process found


              I use this to solve the installation problem of MySQL 5.6 in Ubuntu 15.10 using this link.



              During this installation, I encounter the problem saying:



              mysqld_safe A mysqld process already exists


              Just completely stop the mysqld, mysqld_safe, mysql solves the problem






              share|improve this answer















              /etc/init.d/mysql stop
              service mysql stop
              killall -KILL mysql mysqld_safe mysqld


              When you see the following information, you success



              mysql: no process found
              mysqld_safe: no process found
              mysqld: no process found


              I use this to solve the installation problem of MySQL 5.6 in Ubuntu 15.10 using this link.



              During this installation, I encounter the problem saying:



              mysqld_safe A mysqld process already exists


              Just completely stop the mysqld, mysqld_safe, mysql solves the problem







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited May 14 '16 at 8:41









              dufte

              8,07752739




              8,07752739










              answered May 13 '16 at 4:03









              CharlieCharlie

              12112




              12112























                  3














                  Run sudo /etc/init.d/mysql stop






                  share|improve this answer




























                    3














                    Run sudo /etc/init.d/mysql stop






                    share|improve this answer


























                      3












                      3








                      3







                      Run sudo /etc/init.d/mysql stop






                      share|improve this answer













                      Run sudo /etc/init.d/mysql stop







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Sep 27 '14 at 16:29









                      mschuetzmschuetz

                      411




                      411























                          1














                          Somehow all the answers couldn't help me until I first restarted the server then stopped it, so here are the steps:



                          sudo /etc/init.d/mysql restart

                          sudo /etc/init.d/mysql stop


                          This worked in Ubuntu WSL.






                          share|improve this answer



















                          • 1





                            duplicate of this answer askubuntu.com/a/771591/790920

                            – abu_bua
                            Aug 9 '18 at 11:35











                          • @abu_bua I tried the steps he put there and it still didn't work for me until I restarted and then stropped, that's why I have it specific steps in that order if anyone has same problems.

                            – Eddy Ekofo
                            Aug 9 '18 at 12:24
















                          1














                          Somehow all the answers couldn't help me until I first restarted the server then stopped it, so here are the steps:



                          sudo /etc/init.d/mysql restart

                          sudo /etc/init.d/mysql stop


                          This worked in Ubuntu WSL.






                          share|improve this answer



















                          • 1





                            duplicate of this answer askubuntu.com/a/771591/790920

                            – abu_bua
                            Aug 9 '18 at 11:35











                          • @abu_bua I tried the steps he put there and it still didn't work for me until I restarted and then stropped, that's why I have it specific steps in that order if anyone has same problems.

                            – Eddy Ekofo
                            Aug 9 '18 at 12:24














                          1












                          1








                          1







                          Somehow all the answers couldn't help me until I first restarted the server then stopped it, so here are the steps:



                          sudo /etc/init.d/mysql restart

                          sudo /etc/init.d/mysql stop


                          This worked in Ubuntu WSL.






                          share|improve this answer













                          Somehow all the answers couldn't help me until I first restarted the server then stopped it, so here are the steps:



                          sudo /etc/init.d/mysql restart

                          sudo /etc/init.d/mysql stop


                          This worked in Ubuntu WSL.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Aug 9 '18 at 11:23









                          Eddy EkofoEddy Ekofo

                          112




                          112








                          • 1





                            duplicate of this answer askubuntu.com/a/771591/790920

                            – abu_bua
                            Aug 9 '18 at 11:35











                          • @abu_bua I tried the steps he put there and it still didn't work for me until I restarted and then stropped, that's why I have it specific steps in that order if anyone has same problems.

                            – Eddy Ekofo
                            Aug 9 '18 at 12:24














                          • 1





                            duplicate of this answer askubuntu.com/a/771591/790920

                            – abu_bua
                            Aug 9 '18 at 11:35











                          • @abu_bua I tried the steps he put there and it still didn't work for me until I restarted and then stropped, that's why I have it specific steps in that order if anyone has same problems.

                            – Eddy Ekofo
                            Aug 9 '18 at 12:24








                          1




                          1





                          duplicate of this answer askubuntu.com/a/771591/790920

                          – abu_bua
                          Aug 9 '18 at 11:35





                          duplicate of this answer askubuntu.com/a/771591/790920

                          – abu_bua
                          Aug 9 '18 at 11:35













                          @abu_bua I tried the steps he put there and it still didn't work for me until I restarted and then stropped, that's why I have it specific steps in that order if anyone has same problems.

                          – Eddy Ekofo
                          Aug 9 '18 at 12:24





                          @abu_bua I tried the steps he put there and it still didn't work for me until I restarted and then stropped, that's why I have it specific steps in that order if anyone has same problems.

                          – Eddy Ekofo
                          Aug 9 '18 at 12:24











                          1














                          If you cannot find mysql within /etc/init or /etc/init.d, check that id did not come together with another package.
                          As for me, i found out that my mysqld runs to support nextcloud, i did



                          $> find '/etc' | grep 'mysql'

                          /etc/systemd/system/multi-user.target.wants/snap.nextcloud.mysql.service
                          /etc/systemd/system/snap.nextcloud.mysql.service
                          /etc/apparmor.d/abstractions/mys





                          share|improve this answer




























                            1














                            If you cannot find mysql within /etc/init or /etc/init.d, check that id did not come together with another package.
                            As for me, i found out that my mysqld runs to support nextcloud, i did



                            $> find '/etc' | grep 'mysql'

                            /etc/systemd/system/multi-user.target.wants/snap.nextcloud.mysql.service
                            /etc/systemd/system/snap.nextcloud.mysql.service
                            /etc/apparmor.d/abstractions/mys





                            share|improve this answer


























                              1












                              1








                              1







                              If you cannot find mysql within /etc/init or /etc/init.d, check that id did not come together with another package.
                              As for me, i found out that my mysqld runs to support nextcloud, i did



                              $> find '/etc' | grep 'mysql'

                              /etc/systemd/system/multi-user.target.wants/snap.nextcloud.mysql.service
                              /etc/systemd/system/snap.nextcloud.mysql.service
                              /etc/apparmor.d/abstractions/mys





                              share|improve this answer













                              If you cannot find mysql within /etc/init or /etc/init.d, check that id did not come together with another package.
                              As for me, i found out that my mysqld runs to support nextcloud, i did



                              $> find '/etc' | grep 'mysql'

                              /etc/systemd/system/multi-user.target.wants/snap.nextcloud.mysql.service
                              /etc/systemd/system/snap.nextcloud.mysql.service
                              /etc/apparmor.d/abstractions/mys






                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jan 21 at 14:51









                              Alex KrimiAlex Krimi

                              111




                              111























                                  0














                                  If you are stuck in a running commang inside the console, you can try one of the following.




                                  • Ctrl + c

                                  • Ctrl + q

                                  • F10

                                  • type "exit" + Enter

                                  • Esc






                                  share|improve this answer




























                                    0














                                    If you are stuck in a running commang inside the console, you can try one of the following.




                                    • Ctrl + c

                                    • Ctrl + q

                                    • F10

                                    • type "exit" + Enter

                                    • Esc






                                    share|improve this answer


























                                      0












                                      0








                                      0







                                      If you are stuck in a running commang inside the console, you can try one of the following.




                                      • Ctrl + c

                                      • Ctrl + q

                                      • F10

                                      • type "exit" + Enter

                                      • Esc






                                      share|improve this answer













                                      If you are stuck in a running commang inside the console, you can try one of the following.




                                      • Ctrl + c

                                      • Ctrl + q

                                      • F10

                                      • type "exit" + Enter

                                      • Esc







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered 11 hours ago









                                      Mohd Abdul MujibMohd Abdul Mujib

                                      1214




                                      1214






























                                          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%2f529302%2fhow-to-stop-mysqld-process%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

                                          How did Captain America manage to do this?

                                          迪纳利

                                          南乌拉尔铁路局