-
-
Save oxocode/65257172e024fd4e55f8 to your computer and use it in GitHub Desktop.
large-mysql-db-imports.sh
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
# Import large mysql db. | |
# @usage importdb <database> <mysql.sql> | |
importdb() { | |
set autocommit=0; | |
set unique_checks=0; | |
set foreign_key_checks=0; | |
use "$1"; | |
source "$2"; | |
commit; | |
set unique_checks=1; | |
set foreign_key_checks=1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment