Skip to content

Instantly share code, notes, and snippets.

SQL Stunts sqlstunts

Block or report user

Report or block sqlstunts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sqlstunts / livequeries.sql
Created Jan 22, 2016
Get live queries from MySQL instance in real time.
View livequeries.sql
SELECT, plist.user,, plist.db,
plist.command, plist.TIME, plist.state,, trx.trx_state,
trx.trx_query, blockerw.blocking_trx_id,
WHEN (blockerw.blocking_trx_id IS NOT NULL) THEN 'Blocked'
WHEN (lockedtr.trx_id IS NOT NULL) THEN 'Locked'
sqlstunts / footprint.sql
Created Nov 25, 2015
Script to gather a fast summary on a MySQL database server.
View footprint.sql
#Information about the server
select @@hostname as 'host',@@version_compile_os as 'OS',
@@version as 'Server Version',@@collation_server as 'Default collation',
@@version_compile_machine as 'Server Binary',
@@basedir as 'Binaries Folder', @@datadir as 'Data Folder';
#Information about the databases
#Number of databases
select count(schema_name) as 'Number of DB' from
sqlstunts /
Created Sep 29, 2015
Refactor plugin for MySQL Workbench.
# import the wb module
from wb import *
# import the grt module
import grt
# import the mforms module for GUI stuff
import mforms
# define this Python module as a GRT module
ModuleInfo = DefineModule(name="Refactor", author="mjlmo", version="0.1")
import csv
from tabulate import tabulate
if __name__ == '__main__':
report_headers = []
data = []
with open('data.csv','r') as f:
You can’t perform that action at this time.