Creating a MySQL installation for local testing
Ce contenu n’est pas encore disponible dans votre langue.
This article explains how to install MySQL (via MariaDB) locally in a virtual machine for website testing and development.
Important
These instructions assume you already have a virtual machine running AlmaLinux on your computer.
Installing MySQL (MariaDB)
Section titled “Installing MySQL (MariaDB)”Ruachost servers use MariaDB, a drop-in replacement for MySQL.
For compatibility details, see MariaDB vs MySQL Compatibility.
Steps to Install MariaDB
Section titled “Steps to Install MariaDB”- Start the virtual machine.
- Log in as the root user.
- Install MariaDB by running:
yum install mariadb-server- At the prompt, type
yand press Enter. - Start the MariaDB service:
systemctl start mariadb- Verify that MariaDB is running:
systemctl status mariadbYou should see Active: active (running) in the output.
- Enable MariaDB to start automatically on boot:
systemctl enable mariadb- Secure the installation and set the root password:
mysql_secure_installation- Verify that the root password works:
mysql -u root -pEnter the root password you set. You should see Welcome to the MariaDB monitor.
Tip
After installing MariaDB, you can configure databases, users, and more for local testing.
Cette page vous a-t-elle aidé ?
Merci pour votre retour.