Installing MariaDB Server Guide
Quickstart Guide: Installing MariaDB Server
This guide provides step-by-step instructions for installing MariaDB Server on various operating systems, including package updates and security settings.
For Linux (Ubuntu/Debian/Red Hat-based distributions)
The most common way to install MariaDB on Linux is through your system's package manager.
Steps:
Update Package List:
Before installing, it's a good practice to update your package index.
For Debian/Ubuntu:Bash
sudo apt updateFor Red Hat/CentOS/Fedora:Bash
sudo yum update # For older systems sudo dnf update # For newer systems
Install MariaDB Server:
Install the MariaDB server and client packages.
For Debian/Ubuntu:Bash
sudo apt install mariadb-server mariadb-client galera-4For Red Hat/CentOS/Fedora:Bash
sudo dnf install mariadb mariadb-server
Secure the Installation:
After installation, run the security script to set a root password, remove anonymous users, and disable remote root login.
sudo mariadb-secure-installationFollow the prompts to configure your security settings.
Start and Verify the Service:
MariaDB typically starts automatically after installation. You can check its status and manually start it if needed.
Check status:
sudo systemctl status mariadbStart service (if not running):Bash
sudo systemctl start mariadbVerify installation by connecting as root:Bash
mariadb -u root -pEnter the root password you set during the secure installation.
For Windows
For Windows, MariaDB provides an .msi installer for a straightforward graphical installation.
Steps:
Download MariaDB:
Visit the MariaDB downloads page to get the latest
.msiinstaller.Run the Installer:
Double-click the downloaded
.msifile to start the installation wizard.Follow On-Screen Instructions:
The installer will guide you through the process, including:
Accepting the end-user license agreement.
Selecting features and the installation directory.
Setting a password for the
rootuser.Configuring MariaDB as a service and setting the port (default is 3306).
Optionally, enabling UTF8 as the default server character set.
Important Notes:
Firewall: Ensure your firewall is configured to allow connections to MariaDB on the appropriate port (default 3306) if you need remote access.
Root Password: Always set a strong root password during the secure installation step.
Further Configuration: For production environments, you may need to adjust further settings in the MariaDB configuration files (e.g.,
my.cnfon Linux).
Additional Resources:
Last updated
Was this helpful?

