Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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:
    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

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

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

    Most other services have changed their behavior and can be stopped with
    sudo service <servicename> stop

  3. #3
    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
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    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