Skip to content

Instantly share code, notes, and snippets.

@rubi022
Last active January 24, 2022 23:16
Show Gist options
  • Save rubi022/bb1214b22b928a5c560151b82167204a to your computer and use it in GitHub Desktop.
Save rubi022/bb1214b22b928a5c560151b82167204a to your computer and use it in GitHub Desktop.
import 14gb file mysql
`
mysql -u root -p
set global net_buffer_length=1000000; --Set network buffer length to a large byte number
set global max_allowed_packet=1000000000; --Set maximum allowed packet size to a large byte number
SET foreign_key_checks = 0; --Disable foreign key checking to avoid delays,errors and unwanted behaviour
source file.sql --Import your sql dump file
SET foreign_key_checks = 1; --Remember to enable foreign key checks when procedure is complete!
`
https://stackoverflow.com/questions/13717277/how-can-i-import-a-large-14-gb-mysql-dump-file-into-a-new-mysql-database
@rubi022
Copy link
Author

rubi022 commented Jan 24, 2022

Over mariadb, max values are checked : set global net_buffer_length=1048576; set global max_allowed_packet=1073741824;

Link Stackoverflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment