Last active
October 11, 2016 17:52
-
-
Save vishwasbabu/6433127 to your computer and use it in GitHub Desktop.
MySQL Commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--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