Languages
[Edit]
EN

Linux kill mysql process

3 points
Created by:
Teilsa
345

Today, I would like to show you how to kill process in linux. In this post we will kill mysql process by PID.

1. Find PID of mysql process.

To do this we use ps and grep. In second column we can see PID of each process. In our case PID of mysql is 1714.

[root@localhost its]# ps aux | grep mysql
mysql     1714  0.4  2.8 2171584 344092 ?      Ssl  10:42   0:01 /usr/sbin/mysqld
root      3632  0.0  0.0 112664   972 pts/0    S+   10:47   0:00 grep --color=auto mysql

2. Kill process by PID

[root@localhost its]# kill 1714

3. List all processes and grep by mysql

To ensure we killed mysql process we list again processes and grep by mysql.

[root@localhost its]# ps aux | grep mysql
root      3646  0.0  0.0 112660   968 pts/0    R+   10:48   0:00 grep --color=auto mysql

 

Linux

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join