Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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