Importing large SQL over 1gb!

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
theblade02
New to forums
New to forums
Posts: 5
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Mon Dec 19, 2011 2:14 pm

Importing large SQL over 1gb!

Post by theblade02 »

Hello,
I just rented Webhosting with NFO. I am trying to move my website here and am seeing a difficulty. My forums sql is 1.405gb and have no clue on how to import it in the new data base. If anyone can give me a detailed step by step on how to import it I would appreciate. Also when i requested the backup from my old host I noticed that I had the 1.45gb forums sql and i had a file named the same with extension CREATE. Also have no clue what this create file is.
IcEWoLF
This is my homepage
This is my homepage
Posts: 1192
Joined: Thu Aug 10, 2006 9:41 pm
Contact:

Re: Importing large SQL over 1gb!

Post by IcEWoLF »

Hi there, do you currently use cPanel?
Image
Image
theblade02
New to forums
New to forums
Posts: 5
Joined: Mon Dec 19, 2011 2:14 pm

Re: Importing large SQL over 1gb!

Post by theblade02 »

The nfo webhosting panel yes I do. Made a database but am unable to install the phpmyadmin from the autoinstallers.
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Importing large SQL over 1gb!

Post by Edge100x »

1. Use SFTP/SCP/FTP to upload the .sql file to the root of your webspace (your login information is found on the "File manager" page).
2. Use PuTTY or another SSH client to log in to your webhosting account using the same information.
3. Run a command like:

Code: Select all

mysql -p -D DATABASENAME < yourbackup.sql
Where "DATABASENAME" is the new database that you're importing into (that you previously need to have created through the "Databases" page) and "yourbackup.sql" is the name of the .sql file that you are importing. The mysql client will ask you for your password when it begins the import.

You can install and use phpMyAdmin for other things, but you wouldn't be able to use it to install a .sql file of this size.

With an extremely large and busy forum, you might also consider running your own webserver on a VDS. This will allow you the most configuration freedom and potentially the highest performance.
theblade02
New to forums
New to forums
Posts: 5
Joined: Mon Dec 19, 2011 2:14 pm

Re: Importing large SQL over 1gb!

Post by theblade02 »

I did everything as you said and I got an error.

"ERROR 1153 (08S01) at line 3769: Got a packet bigger than 'max_allowed_packet' bytes"
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Importing large SQL over 1gb!

Post by Edge100x »

That's an odd error for the command-line client to spit out.

You might try again with that line removed or split into two.
theblade02
New to forums
New to forums
Posts: 5
Joined: Mon Dec 19, 2011 2:14 pm

Re: Importing large SQL over 1gb!

Post by theblade02 »

You might try again with that line removed or split into two.
Sorry what do you mean by this?

Aslo this is what i found. Seems like rates should be adjusted on both sides.

http://houseoflaudanum.com/navigate/how ... sql-error/
theblade02
New to forums
New to forums
Posts: 5
Joined: Mon Dec 19, 2011 2:14 pm

Re: Importing large SQL over 1gb!

Post by theblade02 »

I ran this command few times with the same ERROR. Here is something else i found about this ERROR.

http://dev.mysql.com/doc/refman/5.0/en/ ... large.html
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Importing large SQL over 1gb!

Post by Edge100x »

If you open a support request, I can check and attempt to change that setting for you temporarily on our end. That document is correct that you should also try a higher setting on the client side.

What's happening is that you have a very large insert statement, for some reason. Possibly it is an extremely long spam post, or similar.
Post Reply