Skip to content

Instantly share code, notes, and snippets.

@oxocode
Created January 3, 2016 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oxocode/65257172e024fd4e55f8 to your computer and use it in GitHub Desktop.
Save oxocode/65257172e024fd4e55f8 to your computer and use it in GitHub Desktop.
large-mysql-db-imports.sh
# 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