Find the answer to your Linux question:
Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By Fargoch
I've installed mysqld server on my Ubuntu machine. It starts on system startup, but I can't terminate it. Here are commands I've tried: Code: mysqld -shutdown mysqladmin -u root -p ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2013
    Posts
    5

    I can't terminate mysqld


    I've installed mysqld server on my Ubuntu machine. It starts on system startup, but I can't terminate it. Here are commands I've tried:
    Code:
    mysqld -shutdown
    mysqladmin -u root -p shutdown
    kill <mysqld_process_id>
    kill -s TERM <mysqld_process_id>
    I've executed them under sudo and sudo -u mysql but there was no effect. Only kill commands managed to terminate the server for a few seconds, but then it restarted.
    How do I terminate mysqld server? Thanks in advance.

  2. #2
    Just Joined!
    Join Date
    Jun 2013
    Posts
    3
    Hello,

    It's "mysqld" the trailing 'd' stands for demon, so it resurrects itself any time you kill it.

    Try
    Code:
    sudo /etc/init.d/mysqld stop
    to shut the service down.

    Most other services have changed their behavior and can be stopped with
    Code:
    sudo service <servicename> stop
    Regards
    Fargoch
    Lakshmipathi likes this.

  3. #3
    Just Joined!
    Join Date
    Mar 2013
    Posts
    5
    Thank you for your response, but unfortunately it did not help. When I invoke sudo mysqld stop, terminal "hangs" (some command is executed in the background) and mysqld is still alive.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,748
    If mysqld starts on boot, you can stop it temporarily with the command (as root) "service mysqld stop". However, if it is registered in the /etc/rc.d/rcx.d where x is the runlevel (3 or 5 are normal), then it will be restarted on reboot. rc.3.d is for non-gui operations, rc5.d is for gui booting. To remove it altogether then remove all mysqld instances in /etc/rc.d/*. The other option is (assuming you run in gui mode) to bring up the system->administration->services tool and stop/disable mysqld. That will do the same thing, but in a more friendly manner.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •