check_latest_version && sudo apt update && sudo apt upgrade -y
Start MySQL server:
sudo systemctl start mysql
sudo systemctl status mysql
sudo service mysql start
Verify MySQL settings:
sudo cat /etc/mysql/my.cnf
mysql -u root -p -e "SHOW VARIABLES LIKE 'port';"
netstat -tlnp | grep 3306
Test MySQL connectivity:
mysql -u username -p
telnet localhost 3306
mysqladmin ping
MySQL server is not running, not listening on expected port, or connection blocked.
ps aux | grep mysql
tail -f /var/log/mysql/error.log
ss -tlnp | grep 3306