Installing MySQL and Creating Databases on AVIOX Cloud – Complete Beginner to Advanced Guide

Installing MySQL and Creating Databases on AVIOX Cloud – Complete Beginner to Advanced Guide

MySQL is one of the world’s most popular database engines. Whether you're deploying WordPress, running an eCommerce store, or hosting business applications, MySQL is almost always required. When using AVIOX Cloud VPS hosting, installing and managing MySQL becomes simple with the right steps. This guide explains everything from installation to basic administration and database creation.


1. Installing MySQL on AVIOX Cloud VPS

Ubuntu/Debian

Update server packages:

 
sudo apt update sudo apt install mysql-server -y 

Verify installation:

 
mysql --version 

CentOS / AlmaLinux / RockyLinux

Enable MySQL module:

 
sudo dnf install @mysql 

Start and enable the service:

 
sudo systemctl enable --now mysqld 

Check version:

 
mysql --version 

2. Securing MySQL After Installation

MySQL comes with a built-in security script. Run:

 
sudo mysql_secure_installation 

This allows you to:

  • Set a root password
  • Remove anonymous users
  • Disable remote root login
  • Remove test databases
  • Reload privilege tables

These steps are mandatory for production servers on AVIOX Cloud.


3. Logging Into MySQL

On Ubuntu/Debian (auth_socket):

 
sudo mysql 

On CentOS-based systems:

 
mysql -u root -p 

4. Creating a New MySQL Database

Inside the MySQL shell:

 
CREATE DATABASE mywebsite; 

5. Creating a New MySQL User

Example:

 
CREATE USER 'user1' @ 'localhost' IDENTIFIED BY 'StrongPassword123!'

Grant permissions:

 
GRANT ALL PRIVILEGES ON mywebsite. * TO 'user1' @ 'localhost' ; FLUSH PRIVILEGES; 

6. Allowing Remote Database Access (Optional)

If you're connecting from another system:

 
CREATE USER 'user1' @ '%' IDENTIFIED BY 'StrongPassword123!' ; GRANT ALL PRIVILEGES ON mywebsite. * TO 'user1' @ '%' ; FLUSH PRIVILEGES; 

Update firewall:

 
sudo ufw allow 3306 

⚠️ Recommended only for developers—use SSH tunnels for security.


7. Connecting Applications to MySQL

Your application (e.g., WordPress) will need:

  • Database Name
  • Database User
  • Password
  • Host (usually "localhost")

Example wp-config.php:

 
DB_NAME: mywebsite DB_USER: user1 DB_PASSWORD: StrongPassword123! DB_HOST: localhost  

8. Managing MySQL Using phpMyAdmin or Adminer

If you prefer a web interface:

 
sudo apt install phpmyadmin 

OR
Upload Adminer (single PHP file) for fast management.

Both work perfectly on AVIOX Cloud.


9. Creating Automated Backups

Use:

 
mysqldump -u user1 -p mywebsite > backup.sql 

Or enable daily backups through AVIOX Cloud backup space or object storage.


10. Final Thoughts

Installing MySQL and creating databases on AVIOX Cloud is straightforward once you understand the workflow. With proper security, user privileges, and backup strategies, you can run fast and stable applications without issues. This guide provides everything you need—from installation to advanced configurations—to manage MySQL confidently on your AVIOX VPS.


Share:


Leave a comment

Your email address will not be published. Required fields are marked *

Your experience on this site will be improved by allowing cookies Cookie Policy