Skip to content

Home Lab - Online notes

  • Full-Stack Infrastructure Docs

MariaDB 11.8 on Ubuntu 22.04

November 23, 2025 by sandeep

MariaDB 11.8 is one of the latest stable releases and introduces several improvements over previous versions, including enhanced replication, performance stability, and more importantly for modern AI workloads — native vector data type and vector indexing support.

In our environment, the upgrade to MariaDB 11.8 was driven primarily by its built-in vector database capabilities, enabling efficient similarity search and machine-learning-driven workloads without needing specialized external databases.

This guide walks through installing MariaDB 11.8 on Ubuntu 22.04 (Jammy), securing the installation, and enabling remote connectivity.


Why MariaDB 11.8? — Native Vector DB Support

The key motivation for deploying MariaDB 11.8 is its new native vector data type and vector indexes, allowing the database to efficiently store and query embedding vectors used in:

  • Semantic search
  • LLM response ranking
  • Recommendation systems
  • Similarity detection
  • Metadata-enriched AI pipelines

MariaDB 11.8 introduces:

  • VECTOR column type
  • Distance functions like cosine similarity, Euclidean distance
  • Approximate nearest neighbor (ANN) search
  • Optimizations for fast multi-dimensional vector operations

This makes MariaDB 11.8 ideal for environments where an application database and vector store can be unified into a single system.


1. Install Required Packages

Update the package index and install utilities needed for adding external repositories:

sudo apt update
sudo apt install -y software-properties-common curl apt-transport-https

2. Import the MariaDB Signing Key

MariaDB packages are signed. Import the GPG key:

curl -fsSL https://mariadb.org/mariadb_release_signing_key.asc \
    | gpg --dearmor -o /usr/share/keyrings/mariadb-keyring.gpg

This ensures secure and verified package installation.


3. Add the MariaDB 11.8 APT Repository

Add the official MariaDB repository for Ubuntu Jammy:

echo "deb [signed-by=/usr/share/keyrings/mariadb-keyring.gpg] https://mirror.mariadb.org/repo/11.8/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/mariadb.list

4. Update Repository Cache

Refresh package information:

sudo apt update -y

This will now include packages from the MariaDB repository.


5. Install MariaDB Server and Client

Install both the server and client components:

sudo apt install -y mariadb-server mariadb-client

6. Secure the MariaDB Installation

MariaDB provides a security hardening script:

sudo mysql_secure_installation

It allows you to:

  • Set root password (if needed)
  • Remove anonymous users
  • Disable remote root login
  • Remove test databases
  • Reload privileges

This step is strongly recommended for production systems.


7. Verify the MariaDB Service

Check whether the service is running:

sudo systemctl status mariadb

If everything is correct, the service should display as active (running).


8. Enable Auto-Start on Boot

Ensure MariaDB starts automatically:

sudo systemctl enable mariadb

9. Check the Installed Version

Confirm that MariaDB 11.8 is installed:

mariadb --version

Expected output includes:

mariadb  Ver 11.8.x ...

10. Enable Remote Connectivity (Optional)

To allow external servers or applications to connect, edit MariaDB’s main server configuration:

sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

Locate:

bind-address = 127.0.0.1

Modify to:

bind-address = 0.0.0.0

Restart MariaDB:

sudo systemctl restart mariadb

You must also create remote MySQL users with appropriate privileges:

Example:

GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'%' IDENTIFIED BY 'strongpassword';
FLUSH PRIVILEGES;
Categories How To Tags 11.8, ANN search, cosine similarity, Euclidean distance, LLM response ranking, mariadb, Metadata-enriched AI pipelines, Semantic search, Similarity detection, vector db
WordPress for documenting and sharing information.
PostgreSQL 16 on Ubuntu 22.04

Recent Posts

  • Installing Gerrit Code Review
  • PostgreSQL 16 on Ubuntu 22.04
  • MariaDB 11.8 on Ubuntu 22.04
  • WordPress for documenting and sharing information.
  • Ubuntu 22.04 Repository Mirror
  • Wildcard SSL Certficates
  • Orchestrating VMs using scripts and templates
  • Install KVM and Build a Custom Ubuntu 22.04 Cloud Image
  • Management Server for Home Lab
  • Infrastructure overview
© 2025 Home Lab - Online notes • Built with GeneratePress