Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm trying to import a DB from .sql file, but it's impossible, cause like I said is over 6GB with a lot of records in it and I hit the limit of max_allowed_packet. I use my cPanel user to login in mysql via PuTTy, but it requires SUPER privileges to set this variable(max_allowed_packet).

share|improve this question
    
Have you tried MySQL workbench server administration tool? –  Hvandracas Nov 19 '11 at 8:44

1 Answer 1

You could split the file at the end of each group of SQL statements and then import one after the other.

share|improve this answer
    
It doesn't help, cause in 2 of the tables information is about few GBs and can't split it. –  SomeName Nov 18 '11 at 12:14
1  
You could split an insert statement into one insert for one field and then update statements for each of the rest of the fields. –  paulmorriss Nov 18 '11 at 12:15
    
@SomeName Why can't you split it? I'm sure you are not inserting every row in one statement (not even sure that's possible). You can split into inserting 100 rows at a time. insert into table (fields) values (row1 values), (row2 values), ..., (row100 values) –  DisgruntledGoat Nov 18 '11 at 12:37
    
I just can't open the file to see how is it inside. I dump it with MySQL Administrator if there is any matter, cause I just have a MySQL user&psswd(no ssh and etc.) –  SomeName Nov 18 '11 at 12:40
    
The usual annoyance, inadequate hosting packages being spec'd. If a person's dealing with multi-gigabyte databases, they'll probably need ssh access. Then it's a case of uploading a compressed file, uncompressing and importing from the command line. No mess of dealing with php overhead, network transmission issues, etc. that cause the import to fail. –  Fiasco Labs May 19 '12 at 15:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.