Web Hosting & VPS Tips

Unleash Your Server Potential with Expert Insights

Hosting provided by: Cloudways
Free to Try! Up to 40% Off!

Category: VPS Setup

Deploy MySQL on a Rocky Linux VPS—install with
dnf install mysql-server -y
start with
systemctl start mysqld
and secure it via
mysql_secure_installation
Set a root password (e g R0cky$ql!) remove test DBs and disable remote root—confirm \"Y\" to all Enable on boot with
systemctl enable mysqld
and open port 3306 with
firewall-cmd --add-port=3306/tcp --permanent && firewall-cmd --reload
Test with
mysql -u root -p
—expect a prompt after entering your password On DigitalOcean this supports phpMyAdmin—install PHP and Apache (dnf install httpd php-mysqlnd) for web access ensuring uptime for database-driven sites

Back to All Tips