Adding Databases
To install mema-agent, you need to setup MariaDB Enterprise Repository - "MariaDB Tools"
This guide outlines the two primary methods for registering and monitoring your database topologies in MariaDB Enterprise Manager: adding a standalone server directly or adding a full topology via its MaxScale instance.
Option 1: Adding a Standalone Server or Topology (Without MaxScale)
Use this method for a single MariaDB Server or to manually define a Primary/Replica or Galera cluster.
Prepare your server(s)
First, perform these actions on each MariaDB Server you plan to add.
Install the Agent package.
# For Red Hat/CentOS/Rocky
sudo dnf install -y mema-agent# For Debian/Ubuntu
sudo apt install -y mema-agentCreate the Enterprise Manager user (allows the Enterprise Manager server to connect remotely):
CREATE USER 'monitor'@'<Enterprise_Manager_IP>' IDENTIFIED BY '<password>';
GRANT REPLICA MONITOR ON *.* TO 'monitor'@'<Enterprise_Manager_IP>';Replace <Enterprise_Manager_IP> with the IP of your Enterprise Manager server and <password> with a secure password.
Create the Local Agent user (required for the agent to collect detailed metrics from the local database instance):
CREATE USER 'monitor'@'localhost' IDENTIFIED BY '<password>';
GRANT PROCESS, BINLOG MONITOR, REPLICA MONITOR, REPLICATION MASTER ADMIN ON *.* TO 'monitor'@'localhost';Replace <password> with a secure password.
Register in the UI
Go to your MariaDB Enterprise Manager web interface (for example
https://<Enterprise_Manager_IP>:8090).Log in with user who has
editpermission.Begin the Add Database process:
If this is your first time and no databases are present, you'll be on the "Add Database" screen automatically.
If you already have other databases, click the + Add Database button.
Ensure the Database without MaxScale option is selected.

Fill in the connection details for your first server using the Enterprise Manager User (
'monitor'@'<Enterprise_Manager_IP>').
Standalone server or a Topology
To add a Standalone Server: Click Add and proceed to the next step (4).
To create a Topology:
Click the Plus icon (+) to add another server.

Fill in the connection details for the second server in your topology and click Confirm. Repeat for all nodes in your topology.
Once all nodes are added, select the Topology Type (e.g., Primary/Replica — default — or Galera Cluster) and click Confirm.

Link the Agent(s) 🔗
For each server added, link its agent:
Find the server in the inventory list, click the three-dot menu (⋮), and select Install Agent.

Enter the credentials for the Local Agent User (
'monitor'@'localhost') to generate a setup command.
Copy the command and run it on that server's terminal to link the agent.
Option 2: Adding a Topololgy (With MaxScale)
Use this method to add a complete primary/replica or Galera cluster that is managed by one or more MaxScale instances.
Prepare all servers in the topology
Perform these actions on every server in the topology: the MaxScale instance(s) and each backend MariaDB Server attached.
Install the Agent package on all servers.
# For Red Hat/CentOS/Rocky
sudo dnf install -y mema-agent# For Debian/Ubuntu
sudo apt install -y mema-agentCreate a Local Agent user on each backend MariaDB Server:
CREATE USER 'monitor'@'localhost' IDENTIFIED BY '<password>';
GRANT PROCESS, BINLOG MONITOR, REPLICA MONITOR, REPLICATION MASTER ADMIN ON *.* TO 'monitor'@'localhost';Replace <password> with a secure password.
Register the MaxScale instance in the UI 🖥️
Begin the Add Database process:
If this is your first time and no databases are present, you'll be on the "Add Database" screen to begin with.
If you already have other databases, click the + Add Database button.
Select the Database with MaxScale option.
Provide the connection details for your MaxScale instance (IP address, API port
8989, and its admin credentials).Click Add. Enterprise Manager will connect to MaxScale and automatically discover all backend MariaDB servers it manages.
Link all a 🔗
You must link the agent on every server in the topology to Enterprise Manager. The UI will show the MaxScale instance and discovered backend servers marked as "Not Registered."
For each server in the list (start with the MaxScale instance, then each MariaDB server):
Click the three-dot menu (⋮) and select Install Agent.

The UI will generate a unique setup command for that specific server with the username and password you provide. Copy the command.

On that specific server, paste and run the command in the terminal.
Repeat this process for every server in the topology. Once all agents are linked, the dashboard will begin showing the health of the entire topology.
This page is: Copyright © 2025 MariaDB. All rights reserved.
Last updated
Was this helpful?


