Kill Mysql service running on any port, Mac Sierra
11,156
Solution 1
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
Solution 2
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 !!!
![Suraj Shingade](https://i.stack.imgur.com/E7qUZ.jpg?s=256&g=1)
Author by
Suraj Shingade
Fullstack Developer, Java AngularJS, ReactJS, NodeJS, Objective C, Spring Hibernate, micro services, Jhipster, Java 11, Angular 7, Typescript, Android, ios, Micro services
Updated on June 13, 2022Comments
-
Suraj Shingade about 2 years
Kill Mysql service running on any port using terminal. Port number like 3306 or any.
-
Benny64 about 2 yearsThis works perfectly. Initially used
sudo kill -9 <PID>
but MySQL gets assigned another Process Identification Number instead. After using the suggestion above, when you runsudo lsof -i :3306
to check for processes running on port 3306, you should see nothing.