Tested with Ubuntu-24.04 and MySQL Server.
β 1. Update your system
Always start here:
sudo apt update
sudo apt upgrade -y
β 2. Install MySQL Server (official Ubuntu repo)
Ubuntu 24.04 ships with MySQL 8.0.x, which is solid and supported.
sudo apt install mysql-server -y
β 3. Verify MySQL is running
MySQL should start automatically.
sudo systemctl status mysql
If itβs not running:
sudo systemctl start mysql
sudo systemctl enable mysql
β 4. Secure the installation (IMPORTANT)
Run the built-in hardening script:
sudo mysql_secure_installation
Recommended answers:
- Validate password component? β
Y(optional but good) - Password strength β
MEDIUM - Remove anonymous users? β
Y - Disallow root login remotely? β
Y - Remove test database? β
Y - Reload privilege tables? β
Y
β 5. Log in to MySQL (Ubuntu uses socket auth)
On Ubuntu, root logs in via sudo:
sudo mysql
Check version:
SELECT VERSION();
Exit:
exit;
β 6. (Recommended) Create a database and user
Do NOT use root for apps like Pulse.
sudo mysql
CREATE DATABASE pulse CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'pulse'@'localhost' IDENTIFIED BY 'StrongPasswordHere';
GRANT ALL PRIVILEGES ON pulse.* TO 'pulse'@'localhost';
FLUSH PRIVILEGES;
EXIT;
β 7. Allow remote connections (optional)
Only do this if needed (LAN / agents).
Edit MySQL config:
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
Change:
bind-address = 127.0.0.1
To:
bind-address = 0.0.0.0
Restart MySQL:
sudo systemctl restart mysql
Then allow firewall access:
sudo ufw allow mysql
β 8. Test login as app user
mysql -u pulse -p
β 9. Optional: Tune MySQL (servers / Pulse / metrics)
Check defaults:
mysqltuner
Install:
sudo apt install mysqltuner -y
π₯ Notes for Stoxello Pulse
MySQL 8.0 or higher required
- Use utf8mb4 everywhere
- Prefer connection pooling
- Consider MariaDB later only if you need Galera clustering