0

I have a 220GB SQL file. I have to import this into the 355GB Ubuntu MySQL server. There is not enough capacity to import directly from the MySQL server. So I tried to do a remote import from the window with the SQL file. However, it failed several times. I then try to import the 220GB file by a split, but the file size is too big for me. How can I solve this problem? Is division really the answer?

1 Answer 1

1

Did you try opening the command line and doing the following?

  • mysql -u root -p
  • set global net_buffer_length=1000000;
  • set global max_allowed_packet=1000000000;
  • SET foreign_key_checks = 0;
  • source file.sql
  • SET foreign_key_checks = 1
Sign up to request clarification or add additional context in comments.

3 Comments

The SQL file is on the remote server. Can I import the command directly from the remote server? ..with ssh
Yeah but you need to edit the command in the first line: mysql -u{user} -h{hostname} -P{PORT} -p{password} And yes, the command really is like this. So a command like 'mysql -uroot -hlocalhost...' would be correct
Thank you very much. I solved the problem because of you. After I try, in fact, the problem was very simple. so I bless you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.