Skip to content

Instantly share code, notes, and snippets.

@vishwasbabu
Last active October 11, 2016 17:52
Show Gist options
  • Save vishwasbabu/6433127 to your computer and use it in GitHub Desktop.
Save vishwasbabu/6433127 to your computer and use it in GitHub Desktop.
MySQL Commands
--Enable MySQL General Log
SET global general_log = 1;
SET global log_output = 'table';
--MySQL Dump
mysqldump -uroot -ppassword dbname > dump.sql
--enable access from a particular system
GRANT ALL PRIVILEGES ON *.* TO [email protected] identified by "password"
-- see mac conections used in the session
SHOW GLOBAL STATUS LIKE 'max_used_connections’
-- show current active connections
show processlist;
-- Generate script to kill all mysql connections
select concat('KILL ',id,';') from information_schema.processlist where user='cifcpl';
then execute the result (Ex: kill 112; etc) to kill all open connections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment