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
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
3 Comments
Ghun Kim
The SQL file is on the remote server. Can I import the command directly from the remote server? ..with ssh
DataVader
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
Ghun Kim
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