0

Everytime i boot my computer i run:

  1. sudo lsof -i -P -n | grep LISTEN
  2. then look for the PID of 'mysqld' and run 'sudo kill [PID]'

I tried with this script (I also open docker desktop on startup), but didn't work

#!/bin/bash
systemctl --user start docker-desktop
MYSQLD_PID=$(sudo lsof -t -i:3306)
sudo kill $MYSQLD_PID

Also tried searching the command 'mysqld' and getting it PID and then kill it but also didn't work.

After saving the script I chmod +x ~/startup.sh and added it to the 'Startup Applications'

Any ideas? Thanks!

ant other ideas?

  • 1
    sudo in startup applications ... Unsuccessful combination AFAIK ... Use root's crontab or a systemd system service instead without sudo of course ... Also, related https://askubuntu.com/q/1459859 – Raffa Sep 11 '23 at 15:56
  • 3
    Also mysqld is the daemon itself and it should be started at boot by the mysql service … So sudo systemctl disable mysql should disable the service so the daemon isn’t going to be started at boot if that is what you want. – Raffa Sep 11 '23 at 17:05
  • 1
    See for example https://askubuntu.com/a/1465841 – Raffa Sep 11 '23 at 17:11

0 Answers0