Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

whenever I kill object taking port 3306, it replaces it with a new one

Tags:

mysql

ubuntu

I am trying to open up port 3306 for mysql for XAMPP. Currently there is another mysql running on port 3306. It seems that I have two separate mysql running on my system? I have killed mysql to open the port, and then started mysql through the XAMPP manager and it started up just fine.

Another issue I am having is that I am locked out of phpmyadmin and cannot get back in, but I cant do anything about that until I get XAMPP mysql back up and running.

sudo netstat -tlpn | grep 3306 

Shows:

tcp        0      0 127.0.0.1:3306          0.0.0.0:*     LISTEN      30109/mysqld    

I can run

sudo kill -9 30109

It seems like it just kills THAT one process. If I run netstat again, it will just replace that process with a new one.

tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      30310/mysqld    

Does anyone know why it is doing this? Any suggestions on how I can free this up?

like image 508
Logan Musselman Avatar asked Sep 03 '25 17:09

Logan Musselman


1 Answers

In case anyone sees this post, and has not found an answer to their own question that is similar to mine (and simply because this has not been answered yet) I will post my own solution.

I ran

lsof -i TCP:3306

and got the PID, then ran

kill 'PID#'

and it worked... I dont know exactly why this process worked when the previous didn't, even when the PID# was the same, but whatever.

like image 184
Logan Musselman Avatar answered Sep 05 '25 07:09

Logan Musselman



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!