Created by MySQL’s original developers, MariaDB is an open-source, drop-in replacement that provides a complete database solution, supporting diverse workloads from OLTP to OLAP, structured to semi-structured data, and AI-driven vector embedded search. This guide provides simple, step-by-step instructions to download and install MariaDB Community Server.

Installation Instructions

1. Download MariaDB

Download MariaDB from the official MariaDB downloads page and choose the appropriate version for your operating system. The latest stable version of MariaDB Community Server is 11.4.

2. Follow the instructions below for your operating system or Docker:

    • Linux (choice of Debian, RHEL, SLES, Ubuntu)
    • macOS (No download required. Run Homebrew for the download and installation process.)

3. Get Started!

4. For production use cases, upgrade to MariaDB Enterprise Platform

    • Better stability and reliability
    • Advanced security, high availability and scalability with MariaDB MaxScale
    • Additional enterprise features such as enterprise audit and backup
    • Backported features to older release versions
    • Support from the team who engineered the database
    • Long-term maintenance

 

Contact us to upgrade

divider-navy

MariaDB for Linux (Ubuntu/Debian)

1. Update the package list by running sudo apt update

2. Install MariaDB server by running sudo apt install mariadb-server mariadb-client

3. Secure the installation by running sudo mariadb-secure-installation

This script guides you through important security settings like setting a root password, removing anonymous users, and disabling remote root login.

4. Start the MariaDB service by running sudo systemctl start mariadb

5. Verify the installation by running mariadb -u root -p

Enter the root password you set during the secure installation step. This should log you into the MariaDB client.

Additional Notes: While these steps are generally applicable to Debian and Ubuntu, there might be slight variations depending on your specific version. Refer to the official MariaDB documentation for the most accurate instructions.

MariaDB for Windows

1. Choose the Microsoft installer and double click the MariaDB downloaded MSI file to run the installer.

2. Follow the on-screen prompts:

  • Accept the license agreement.
  • Choose the components you want to install (choose default).
  • Set the root password for MariaDB. This is an important security step.

Optional:

  • Choose to install MariaDB as a Windows service, allowing it to start automatically when your computer boots.
  • Configure networking and specify the port MariaDB will use.

3. Complete the installation:

  • Click the “Install” button to begin the installation process.
  • Wait for the installation to complete. This may take a few minutes.
  • Click “Finish” to exit the installer.

4. Verify the installer:

  • Open a command prompt and type mariadb -u root -p
  • Enter the root password you set during the installation.
  • If the installation was successful, you should see the MariaDB command prompt.

Additional Notes:

  • Administrator privileges: You need administrator privileges to install MariaDB on Windows.
  • Antivirus software: Temporarily disable your antivirus software during the installation process, as it might interfere with the installer.
  • Configuration: After installation, you can further configure MariaDB by editing the configuration file (my.ini), which is typically located in the MariaDB installation directory.

MariaDB for macOS (via Homebrew)

1. Install Xcode:

Open a terminal window and run xcode-select --install

This installs command-line developer tools, which are required for Homebrew.

2. Install Homebrew:

Homebrew is a package manager for macOS that makes it easy to install software like MariaDB.

In the terminal, run /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

3. Install MariaDB:

Run brew install mariadb

This downloads and installs the latest version of MariaDB Community Server.

4. Start MariaDB:

Run brew services start mariadb to automatically launch MariaDB at login.

5. Secure your installation (recommended):

Run sudo mariadb-secure-installation

Enter your macOS user password if prompted. This tool guides you through setting a root password, removing anonymous users, and performing other security best practices. To use the recommended settings, simply press ENTER for each yes/no question.

6. Verify your installation:

Run mariadb -u root -p

Enter the root password you set in step 5.

You should now be connected to the MariaDB server.

Additional Notes: For more detailed instructions or troubleshooting, refer to the official MariaDB documentation: https://staging-mdb.com/kb/en/installing-mariadb-on-macos-using-homebrew/

Install MariaDB with Docker

1. Download and install Docker Desktop for your operating system (Linux, macOS or Windows) from the official Docker website: https://www.docker.com/products/docker-desktop/

2. Create a container:

  • Run the following command to create a new container named mariadb-server from the official MariaDB Docker image, setting the root password with the MARIADB_ROOT_PASSWORD environment variable, and publishing port 3306 on your host machine:

docker run --name mariadb-server --env MARIADB_ROOT_PASSWORD=your_password --publish 3306:3306 --detach mariadb:latest

  • Replace your_password with a strong password for the MariaDB root user.

3. Verify the installation:

  • Run the following command to check if the container is running: docker ps
  • You should see a container named mariadb-server in the list.
  • To connect to the MariaDB server from your host machine, you can use a MySQL client tool like mariadb or a GUI tool like DBeaver. Connect to localhost on port 3306 using the root user and the password you set.

Additional Resources:

For more information: https://staging-mdb.com/kb/en/installing-and-using-mariadb-via-docker/

 

Video: The Easiest Way to Install MariaDB for App Development