Last active
April 14, 2022 20:26
-
-
Save emrahoruc/5121dde0bdc1a34488a367edb0b1a73c to your computer and use it in GitHub Desktop.
MySql Some Command linses
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
# Export | |
mysqldump -u root site_database > /home/sitename/BCKP001.sql | |
mysqldump -u root site_database | gzip > /home/sitename/BCKP001.sql.gz | |
# Ignore specific table | |
mysqldump -u root site_database --ignore-table=site_database.table1 > /home/sitename/BCKP001.sql | |
# Export specific table | |
mysqldump -u root site_database table1 > /home/sitename/BCKP001.sql | |
# Import | |
mysql -u root site_database < /home/sitename/BCKP001.sql | |
zcat /home/sitename/BCKP001.sql.gz | mysql -u root site_database | |
gunzip /home/sitename/BCKP001.sql.gz | mysql -u root site_database | |
# kill a specific mysql query | |
mysqladmin processlist | |
mysqladmin kill <query_id> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment