Support queries for REDCap

Database sizing

SELECT table_schema "database name",
    sum( data_length + index_length ) / 1024 / 1024 "database size in MB",
    sum( data_free )/ 1024 / 1024 "free space in MB"
FROM information_schema.TABLES
GROUP BY table_schema; 

User privileges

SHOW GRANTS; --all users
SHOW GRANT FOR '<user>'@'[<database> | %]'; -- specific user

Active user sessions

SHOW PROCESSLIST;
SHOW FULL PROCESSLIST;

Table of Contents


Updated on August 7, 2025