MYSQL / AURORA Database Troubleshooting

Number of Connections by Host 

SELECT SUBSTRING(HOST, 1, 10) , DB,USER , COUNT(*) AS Count
FROM information_schema.processlist
group by SUBSTRING(HOST, 0, 10) , DB,USER
ORDER BY Count desc ;

-- '10.10.50.22', 'Portal', 'webguest-dev', '46'

Aurora Max Connections

select AURORA_VERSION();

select * from mysql.slow_log
where sql_text not like '%LOAD DATA%'
order by query_time desc
limit 1000 ;

select count(*) from mysql.general_log
where user_host not like 'rdsadmin%'
and user_host not like '[rdsadmin]%'
and event_time > '2017-06-15 18:51:14';

select current_timestamp();

desc mysql.general_log  ;

select @@MAX_CONNECTIONS
-- '4000'

select *  from mysql.general_log
where command_type like '%Connect%';

select *  from mysql.general_log_backup
where command_type like '%Connect%' ;

SHOW GLOBAL STATUS LIKE '%Connection_errors%';

SHOW STATUS WHERE `variable_name` = 'Threads_connected';

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *