MySQL InnodDB Import from mysqldump takes forever.

HI,

I have a problem with my Mysql DB (InnodDB tables). I'll take mysqldump backups every 12 hours with the following command:

MySqlDump --defaults-file=$MySqlBackupConf --host=localhost --result-file $MySqlBackupFile --default-character-set=utf8 --events --triggers --routines --single-transaction=TRUE --log-error=$MySqlBackupLogFile --verbose $Item

Backup takes 8 minutes, size is about 2.4GB

The resotre is made with the Data Import from Workbench but it takes long, long, long... (5-6 hours or more):

mysql.exe --defaults-file="c:\...\tmp8zrchd.cnf"  --protocol=tcp --host=localhost --user=root --port=3306 --default-character-set=utf8 --comments --database=database_2  < "C:\\Users\\user\\Documents\\dumps\\Dump20170315.sql"

The OS is Windows Server 2012 R2, Mysql 5.7.16. I tried the following settings but no change:

innodb_log_buffer_size=256M
innodb_buffer_pool_size=3G
innodb_log_file_size=1G
innodb_flush_log_at_trx_commit = 0
innodb_write_io_threads = 12

SET GLOBAL FOREIGN_KEY_CHECK=0

Can anyone help with this?

Thx
Andras CzömpölIT SpecialistAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aaron TomoskySD-WAN SimplifiedCommented:
I don't see you mention autocommit=0 or some of the other suggestions found here
https://dev.mysql.com/doc/refman/5.7/en/optimizing-innodb-bulk-data-loading.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Andras CzömpölIT SpecialistAuthor Commented:
Thx. Acctually in the and was the SET unique_checks=0; what helped. Still it takes 1 hour to import a 2.4GB backup sql. So, I guess I have to refactor the database structure.

Thank You!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.