Everytime i boot my computer i run:
- sudo lsof -i -P -n | grep LISTEN
- 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?
sudo
in startup applications ... Unsuccessful combination AFAIK ... Useroot
's crontab or a systemd system service instead withoutsudo
of course ... Also, related https://askubuntu.com/q/1459859 – Raffa Sep 11 '23 at 15:56mysqld
is the daemon itself and it should be started at boot by themysql
service … Sosudo 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