vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Forum and Server Management (https://vborg.vbsupport.ru/forumdisplay.php?f=232)
-   -   Importing Large SQL (https://vborg.vbsupport.ru/showthread.php?t=238537)

Pikeypete 03-18-2010 03:38 AM

Importing Large SQL
 
Hey there,

Just need some general assistance; what would be the best way to import a large SQL?
I have it hosted on my server, and I attempted to import through SSH however this literally froze the server and the import completely, with the eventual disconnection.

The database in question is ~8GB.

Is there a better method?

Thanks for assistance

Marco van Herwaarden 03-19-2010 12:16 PM

SSH is the way to go. I would first try by letting it run for 10 minutes, Most likely it will be finished in this time, but that also depends on the server. You could close your sites for a few minutes to speed up things.

Alternative would be to apply a nice factor to the process.

Ichigo88 03-23-2010 07:58 PM

Open your SSH/Telnet client and log into your website. The command line prompt you will see will vary by OS. For most hosting companies, this will bring you into the FTP root folder.

You can either change directoties to wherever the backup is located and type in the following:

mysql -u dbusername -p databasename < backupname.sql

Or if you do not want to change directories and you know the path to where the backup is located, type in the following:

mysql -u dbusername -p databasename < /path/to/backupname.sql

You will be prompted for the database password. Enter it and the database will backup.

If your hosting company has you on a remote MySQL server, such as mysql.yourhost.com, you will need to add the servername to the command line. The servername will be the same as in your config.php. The command line will be:

mysql -h servername -u dbusername -p databasename < backupname.sql

Or:

mysql -h servername -u dbusername -p databasename < /path/to/backupname.sql

borbole 03-26-2010 01:28 PM

Quote:

Originally Posted by Pikeypete (Post 2005833)
Hey there,

Just need some general assistance; what would be the best way to import a large SQL?
I have it hosted on my server, and I attempted to import through SSH however this literally froze the server and the import completely, with the eventual disconnection.

The database in question is ~8GB.

Is there a better method?

Thanks for assistance

If SSH won''t work then give bigdump or mysqldumer a try. They both handle large files with ease.

Otherwise try to split up the backup file and import it piece by piece. I have done it several times and it has worked fine as well.

Oyabun 03-26-2010 02:22 PM

<a href="http://www.mysqldumper.de" target="_blank">http://www.mysqldumper.de</a>


All times are GMT. The time now is 09:21 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01119 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete