Why MariaDB 12.3? — 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 curl ca-certificates software-properties-common
2. Download and execute the official MariaDB setup script.
curl -LsSO https://r.mariadb.com/downloads/mariadb_repo_setup
sudo bash mariadb_repo_setup --mariadb-server-version="mariadb-12.3"
3. Install Mariadb
sudo apt update
sudo apt install -y mariadb-server mariadb-client
4. Lock Down the DB
sudo mariadb-secure-installation
5. 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).
6. Enable Auto-Start on Boot
Ensure MariaDB starts automatically:
sudo systemctl enable mariadb
7. 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:
CREATE DATABASE pm;
CREATE USER 'pmuser'@'%' IDENTIFIED BY 'strongpassword';
GRANT ALL PRIVILEGES ON pm.* TO 'pmuser'@'%';
FLUSH PRIVILEGES;