MariaDB Show Processlist Information_schema Processlist Docs

Published
Length
3 min read

Luis Felipe Dias

All posts

You check active database threads by running the native thread inspection command or querying the system process table. Reviewing the mariadb show processlist information_schema processlist docs helps you see which queries run right now. Teams often grant broad process viewing roles to developers so they can debug slow queries. Still, overly broad roles let users read raw SQL text from every active session on the server. How mariadb show processlist information_schema processlist docs work Ma

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You check active database threads by running the native thread inspection command or querying the system process table. Reviewing the mariadb show processlist information_schema processlist docs helps you see which queries run right now. Teams often grant broad process viewing roles to developers so they can debug slow queries. Still, overly broad roles let users read raw SQL text from every active session on the server.

How mariadb show processlist information_schema processlist docs work

MariaDB tracks every active client session as an individual thread inside the database engine. You can inspect these threads in two primary ways during daily operations. First, you can run the native show command to return a quick snapshot of running threads. Second, you can query the processlist table inside the information schema database. Both methods show the thread ID, the database user, the client host, and the current command state.

The system table approach gives your team much more flexibility than the basic show command. Because the information schema table acts like a standard view, you can filter and sort the results. Engineers can write standard queries to find threads that run longer than a set number of seconds. You can also group threads by user or database name to spot heavy workloads fast. The native show command just dumps the full list or a truncated list to your screen.

Database roles control what an engineer sees when they check active threads with either method. By default, a standard database user only sees their own running threads in the output. To see threads owned by other accounts, the user needs a global process privilege. Database admins often grant this global role to support staff and backend engineers for debugging.

What native process privileges solve and leave open

Granting the native process role solves the immediate visibility problem for your engineering team. When a database slows down, engineers can log in and check which query blocks other threads. They can see the thread state, check how long the query has run, and find locks. This built-in role keeps teams from needing full admin rights just to view server activity.

Still, the native setup leaves a major security and operational gap open during live sessions. Database roles only decide who logs in and whether they can read all thread data. The database does not redact sensitive values inside the live query text column of the process list. If an app runs a query containing emails, phone numbers, card numbers, or national IDs, that text appears in plain view. Anyone with the global process role can see those raw values while the query runs.

Security Information & Event Management (SIEM) + API Schema Validation: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Also, giving engineers direct database accounts to check thread tables creates an audit headache. When teams share a support account to inspect the server, your logs only show the shared account name. You cannot tell which team member ran a check or killed a stuck thread. Native privileges also cannot ask a team lead for approval before an engineer runs a kill command. You need query-level controls that check every statement in flight and rewrite sensitive fields in results.

Best practices for inspecting active MariaDB threads

Start by separating read-only thread inspection from the ability to stop running queries. Give your developers access to view their own app threads without handing out global kill rights. When engineers query the system process table, tell them to select only the columns they need. Skipping the full query info column reduces load on busy servers and limits exposure of raw values.

Keep your database accounts tied to individual people or specific apps rather than shared team logins. When you pair individual identity with runtime statement checks, you keep both speed and safety. Your engineers get the thread data they need to fix slow queries right away. At the same time, masking rewrites matched fields in results so sensitive data stays safe.

Check MySQL queries and results on the wire

MySQL grants control who logs in. They do not check single queries or mask sensitive columns once a session starts. With hoop.dev, you run an open-source proxy, a sidecar for your MySQL. It runs next to MySQL, RDS, or Aurora and reads the MySQL wire protocol.

Multi-statement batches and prepared queries are split and checked one by one by hoop.dev guardrails. When a rule refuses a query, MySQL returns a native error packet with your message. On the response path, hoop.dev data masking rewrites string values in returned rows that match your rules. Every query and decision is logged per resource. See the MIT-licensed project on GitHub.

Frequently asked questions

What is the difference between the show command and the information schema processlist table?

The show command returns a static list of active threads that you cannot filter with standard query clauses. The information schema table lets you filter, sort, and join thread data using standard SQL queries.

Why can I only see my own queries in the MariaDB process list?

MariaDB restricts thread visibility to your own database user account by default for security. You must have the global process privilege assigned to your role to view threads from other users.

Does checking the process list lock the database or slow down active queries?

Reading the process list takes a brief internal read lock on thread structures to gather state data. Filtering the system table without pulling huge query text strings helps keep server overhead very low.

The query runs. The emails stay hidden.