Report this

What is the reason for this report?

Big size SQL import problem?

Posted on March 29, 2015

Hi.

I have backup of Mybb forum SQL. I want to import that. SQL file size is 222MB. I used Bigdump.php. But when proccess is %100, it give me error:

ALTER TABLE `mybb_posts` ADD PRIMARY KEY (`pid`), ADD KEY `tid` (`tid`,`uid`), ADD KEY `uid` (`uid`), ADD KEY `visible` (`visible`), ADD KEY `dateline` (`dateline`), ADD KEY `longipaddress` (`longipaddress`), ADD FULLTEXT KEY `message` (`message`); -> Lost connection to MySQL server during query

I tried many times but import is not completed. How i fix that?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This question was answered by @JonsJava:

PHP has a timeout, and a max-upload-size limit.

I’d recommend that you do it this way:

  • upload your file to /root/ and name it new_import.sql
  • in BASH/PuTTY, run this (change root_pw, and db_name):
root_pw='YOUR_PASSWORD_HERE'
db_name="YOUR_DB_NAME"
mysql -u root -p${root_pw} -D $db_name < /root/new_import.sql

If you need help with this, let me know.

View the original comment

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.