0

I have a dump with:

SET unique_checks=0;
SET foreign_key_checks=0;
SET autocommit=0;

I import it with mysql < file.sql command and it takes a lot of time - I can't wait until it's finished. It takes ~90 seconds to restore this dump on Hetzner machine with similar specs.

Ubuntu 16.04, default 5.7 mysql server, default performance settings.

How can it be solved or debugged?

Dmitry
  • 179
  • 1
  • 2
  • 8
  • You've tried this on 2 different computers with the same internet connection? That would be my first place to look so you can eliminate that factor. Then check your bandwidth, what all is running on your MySQL box. More details would help us give a complete answer. – Mika Wolf Feb 22 '18 at 16:08
  • Yes, it was the same. Also I've copied these dumps to these machines. – Dmitry Feb 22 '18 at 20:28

1 Answers1

0

Check your log files, both MySQL and system, and see what (if any, but hoping there are) errors are logged there. That's a good starting place.

After that, things to check: -- make sure no one else is logged into the database and no processes are performing actions on the MySQL database. -- make sure you are logged in with a user who has adequate privileges to dump the database. -- have you tried the mysqldump command using the -u USERNAME and -p PASSWORD options? Since this command is intended for database dumps it should perform better.

Mika Wolf
  • 169
  • 3