{% extends "base.html" %} {# Info tooltip macro - hover to show definition #} {% macro info_tooltip(text, position='right') %}
{% endmacro %} {% block content %}

MySQL Awesome Stats Collector

Select one or more database hosts to collect diagnostic information including InnoDB status, global variables, and active processes.

{% if error %}
{{ error }}
{% endif %}

Select Hosts

{% if hosts %}
{# Grouped Hosts #} {% for group in groups %} {% set group_hosts = grouped_hosts.get(group.id, []) %} {% if group_hosts %}

{{ group.name }}

({{ group_hosts|length }})
{% for host in group_hosts %} {% endfor %}
{% endif %} {% endfor %} {# Ungrouped Hosts #} {% if ungrouped_hosts %}
{% if groups %}

Ungrouped

({{ ungrouped_hosts|length }})
{% endif %}
{% for host in ungrouped_hosts %} {% endfor %}
{% endif %}
{% else %}

No Hosts Configured

Add your MySQL servers to start collecting diagnostics.

Add Hosts
{% endif %}
{% if hosts %}

Advanced Options

{% endif %} {% if hosts %}
{% endif %}

Security Recommendation

Always use a read-only MySQL user with minimal privileges for MASC. This tool only needs SELECT access to system tables — never use your admin credentials.

MySQL Commands
-- Create a dedicated read-only user for MASC
-- Run these commands as MySQL root/admin user

-- 1. Create the user (change 'masc_password' to a secure password)
CREATE USER 'masc_reader'@'%' IDENTIFIED BY 'masc_password';

-- 2. Grant minimal required privileges
-- Process list access (for SHOW PROCESSLIST)
GRANT PROCESS ON *.* TO 'masc_reader'@'%';

-- Replication client (for SHOW MASTER/REPLICA STATUS)
GRANT REPLICATION CLIENT ON *.* TO 'masc_reader'@'%';

-- Read access to performance_schema (for hot tables, optional)
GRANT SELECT ON performance_schema.* TO 'masc_reader'@'%';

-- Read access to information_schema (automatic, but explicit)
GRANT SELECT ON information_schema.* TO 'masc_reader'@'%';

-- 3. Apply the changes
FLUSH PRIVILEGES;

-- Verify grants
SHOW GRANTS FOR 'masc_reader'@'%';

Tip: Replace '%' with your MASC server IP for better security. Manage hosts →

{% endblock %}