Installing MariaDB Server Guide
Quickstart Guide: Installing MariaDB Server
This guide provides a quick overview of how to install MariaDB Server on common operating systems. The specific steps may vary slightly depending on your Linux distribution or if you are installing on Windows.
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 update
For 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
For 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-installation
Follow 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 mariadb
Start service (if not running):Bash
sudo systemctl start mariadb
Verify installation by connecting as root:Bash
mariadb -u root -p
Enter 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
.msi
installer.Run the Installer:
Double-click the downloaded
.msi
file 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
root
user.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.cnf
on Linux).
Additional Resources:
Last updated
Was this helpful?