Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to kill mysql processes

My docker-compose command won't run because I have these processes running:

$ sudo lsof -nP +c 15 | grep LISTEN | grep sql
mysqld          113           _mysql   19u     IPv6 0xd0786f05dec2ff3f         0t0      TCP *:3306 (LISTEN)
mysqld          113           _mysql   22u     IPv6 0xd0786f05dec789ff         0t0      TCP *:33060 (LISTEN)

Every time I kill the process listed, it starts up again with a new PID.

I've already uninstalled it:

$ brew uninstall mysql
Error: No such keg: /usr/local/Cellar/mysql

How can I totally and permanently kill this?

I've tried

sudo /usr/local/mysql/bin/mysqld stop

and

/usr/local/mysql/bin/mysqladmin -u root -p shutdown 

When I try:

sudo mysql.server stop

It shows:

ERROR! MySQL server PID file could not be found!

but I still see new processes running for mysqld

like image 500
JacobIRR Avatar asked Aug 23 '26 18:08

JacobIRR


1 Answers

(1) Search process by port sudo lsof -i tcp:3306 (2) Kill by userid pkill -u UID

like image 61
Kaya Toast Avatar answered Aug 26 '26 08:08

Kaya Toast



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!