Connect MySQL And MariaDB To Mini DBA


Use the MySQL and MariaDB connection workflow to add a MySQL or MariaDB server to Mini DBA monitoring. Monitoring uses database permissions for process, object, metadata, and diagnostic views, plus optional host OS login for CPU, memory, drive, and disk I/O metrics.

Mini DBA connect MySQL MariaDB

Add Server Fields

In Servers, select Add Server and choose MySQL.

Field What to enter
Type MySQL
Instance / Host MySQL or MariaDB host name or address
Username MySQL or MariaDB monitoring user
Password Password for the monitoring user

The Mini DBA Engine must be able to reach MySQL or MariaDB, normally on port 3306 unless your server uses a different port.

What Mini DBA Monitors After Connection

With the recommended MySQL or MariaDB permissions, Mini DBA can monitor:

  • Current sessions, process list, blocking symptoms, and query activity.
  • Database inventory, metadata, object definitions, and view-related plan context.
  • InnoDB information, transactions, locks, and storage-engine diagnostics.
  • Query and performance data available through server views and routines.
  • Permissions, health checks, alerts, and performance tuning evidence.
  • Host CPU, memory, drive capacity, and disk I/O when Host OS Login or cloud host metrics are configured.

Required MySQL And MariaDB Permissions

The MySQL permissions modal checks:

  • SHOW DATABASES: essential for database discovery.
  • SELECT: essential for metadata, explain plan, and object access.
  • PROCESS: essential for process list and session activity.
  • SHOW VIEW: essential for complete explain and view-definition context.
  • EXECUTE on sys.*: essential for supported diagnostic routines.
  • KILL, CONNECTION_ADMIN, SUPER, or RDS kill procedure: optional, allows killing sessions from the console.
  • OS Login or Cloud Host Login: optional, enables host-level metrics.

SQL Example: Create A Monitoring User

Run this as a MySQL or MariaDB administrator. Change the user, allowed host, and password first.

CREATE USER 'minidba_monitor'@'%' IDENTIFIED BY 'UseASecretPasswordHere';

GRANT SHOW DATABASES ON *.* TO 'minidba_monitor'@'%';
GRANT SELECT ON *.* TO 'minidba_monitor'@'%';
GRANT PROCESS ON *.* TO 'minidba_monitor'@'%';
GRANT SHOW VIEW ON *.* TO 'minidba_monitor'@'%';
GRANT EXECUTE ON sys.* TO 'minidba_monitor'@'%';
GRANT REPLICATION CLIENT ON *.* TO 'minidba_monitor'@'%';

-- Optional: allow session kill on MySQL 8.0+ where CONNECTION_ADMIN is supported.
GRANT CONNECTION_ADMIN ON *.* TO 'minidba_monitor'@'%';

FLUSH PRIVILEGES;

For older MySQL or MariaDB versions that do not support CONNECTION_ADMIN, use the least-privilege session-management permission available in your version and security policy.

MariaDB Notes

MariaDB versions differ from MySQL in privilege names and feature availability. If a grant fails, check the equivalent privilege for your MariaDB version. The permissions modal is the source of truth for what Mini DBA can currently see with the connected login.

AWS RDS And Cloud-Hosted MySQL

For AWS RDS MySQL or compatible hosted services, the permissions modal can check the RDS kill routine. Grant it only if you want Mini DBA operators to kill sessions from the console:

GRANT EXECUTE ON PROCEDURE mysql.rds_kill TO 'minidba_monitor'@'%';

For cloud-hosted servers where direct OS login is unavailable, configure cloud provider access in Cloud Provider Settings.

Verify Permissions In Mini DBA

After adding MySQL or MariaDB, open the server and use the MySQL Connectivity Permissions modal. Select Refresh to probe current permissions and host metric access.

Use the modal when:

  • Database discovery is incomplete.
  • Activity or process list data is missing.
  • Explain or view-related data is incomplete.
  • Session kill actions do not work.
  • Host CPU, memory, drive, or disk I/O metrics are missing.

Host OS Login And Metrics

MySQL and MariaDB host OS login is configured from the MySQL permissions modal after the server is added. On Linux, use SSH with password or private key authentication; Mini DBA uses host commands such as top, df, and iostat. On Windows, use an account with suitable WMI and performance counter access where the MySQL or MariaDB host supports Windows host monitoring.

Host OS login can add:

  • Host CPU percentage.
  • Total, used, and free memory.
  • File system capacity and free space.
  • Disk reads and writes per second.
  • Disk throughput, latency, queue length, and utilization.

For detailed setup, see Host OS Login.

MySQL And MariaDB Connection Troubleshooting

  • If connection fails, confirm the Mini DBA Engine can reach the host and port.
  • If authentication fails, confirm the user host pattern, such as 'minidba_monitor'@'%', matches the engine host.
  • If databases are missing, grant SHOW DATABASES.
  • If activity is incomplete, grant PROCESS.
  • If object or plan detail is missing, grant SELECT and SHOW VIEW.
  • If sys routines fail, grant EXECUTE on sys.*.
  • If cloud-host kill actions fail, grant the supported hosted-service kill routine such as mysql.rds_kill.
  • Right-click the MySQL or MariaDB server in the tree and open Connectivity Log for authentication, host-pattern, timeout, TLS, privilege, and data-access errors captured by the engine.

MySQL Monitoring Permissions FAQ

Is root required?

No. Root is not recommended for routine monitoring. Use a dedicated monitoring user with the grants shown above.

Why is PROCESS important?

PROCESS allows Mini DBA to see process and session activity across the server. Without it, activity and troubleshooting pages may be incomplete.

Can Mini DBA monitor cloud-hosted MySQL?

Yes when the database endpoint is reachable and the login has the required permissions. Cloud host metrics may require Cloud Provider Settings instead of direct OS login.

Related Pages