Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kill Mysql service running on any port, Mac Sierra

Tags:

mysql

service

Kill Mysql service running on any port using terminal. Port number like 3306 or any.

like image 592
Suraj Shingade Avatar asked Nov 14 '25 13:11

Suraj Shingade


2 Answers

sudo pkill mysql should serve your purpose.

If for some reason mysqld survives this, sudo pkill mysqld as well.

More information from SuperUser: https://superuser.com/questions/983969/how-to-kill-mysql-with-moving-pid

like image 87
cuuupid Avatar answered Nov 17 '25 08:11

cuuupid


Simplifying your answer.

1) Go to Launchpad Type Terminal then Run this.

2) Run following commands

Check if Mysql service is running

For all listening ports

netstat -vanp tcp

Apply port filter

netstat -vanp tcp | grep

netstat -vanp tcp | grep 3306


Kill Mysql Service

sudo pkill mysql

or
sudo pkill mysqld

< Enter password >

Done !!!

like image 23
Suraj Shingade Avatar answered Nov 17 '25 09:11

Suraj Shingade



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!