Private Label and Cobranded VoIP Solutions
BrainCast internet & phone based message/memo recording & reminder organization system
Internet Phone Service and Broadband Phone Service by ViaTalk

Go Back   VoIP Forums, Internet Phone Service Forums, & Web Hosting Forums > CoderForums - Programming Discussion > General Programming Issues > Programming Languages & Technologies > PHP

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-12-2002, 09:40 AM
Trazx Trazx is offline
Registered User
 
Join Date: Oct 2001
Posts: 8
How to dump a 3.5MB+ sql into a database..??

Hi,

I have a really really large mysql file I wanted to put into another database(for backup in future and testing purposes), but I am not certain how to do it.. what is the easiest way..to copy sql data from one database on a server to another.. when I do it right now it says Error everytime.. (it doesn't specify what type of error..it just says error and that's supposed to help me out with a 3.5mb file..sad..) anyway whats the best way??, anything that can make this process alot easier..and whiche method have you used??

please reply. Thank you.


Reply With Quote
  #2  
Old 03-12-2002, 11:12 AM
spyres spyres is offline
Senior Customer
 
Join Date: Jan 2001
Posts: 340
Use secure telnet and do it from the command line. You have to request special permission from HR via a TT to do this.
Reply With Quote
  #3  
Old 03-12-2002, 01:21 PM
Trazx Trazx is offline
Registered User
 
Join Date: Oct 2001
Posts: 8
Thanks..

Hi

Okie, I figured I would have to do it with secure telent.. there is one problem..however.. I would call my self supreme newbie with telent.. any websites that can help me learn?, better yet do you know the exact command(s) to copy structure and data from one db to another?
Reply With Quote
  #4  
Old 03-12-2002, 08:06 PM
eporue eporue is offline
Registered User
 
Join Date: Jun 2001
Location: Houston
Posts: 34
It is actually very simple.

First, FTP the sql database to your root directory.

Then, you log on into your account with telnet, and type:

mysql -udb_userid -pdb_user_password --database account_newdb< database_old.sql

where
db_userid is the user name you created for your database
db_user_password is the password of that user
account_newdb is the database you want to populate
and database_old.sql is the database that you uploaded.

Play with it. But backup everything first.
Reply With Quote
  #5  
Old 03-13-2002, 09:54 PM
Trazx Trazx is offline
Registered User
 
Join Date: Oct 2001
Posts: 8
Humm I appreciate the replies..but I can't seem to get it to work..
after I put in

thedatabasename> othersqlfile.sql

nothing realy happens.. and I have to clear buffer(\c) to go back to normal.. any more tips?
Reply With Quote
  #6  
Old 03-14-2002, 01:18 AM
eporue eporue is offline
Registered User
 
Join Date: Jun 2001
Location: Houston
Posts: 34
It is no >, but < ......

The syntax is:

mysql -udb_userid -pdb_user_password --database account_newdb< database_old.sql
Reply With Quote
  #7  
Old 03-14-2002, 07:48 PM
Trazx Trazx is offline
Registered User
 
Join Date: Oct 2001
Posts: 8
Thank you I finally got it to work


I connected to ssh..blah blah blah..
and then typed: \u thedatabasename
then I typed: source dumpfile.sql
and all was well..thank you very much.. I really appreciate your help.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump