PDA

View Full Version : How to dump a 3.5MB+ sql into a database..??


Trazx
03-12-2002, 09:40 AM
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.


:)

spyres
03-12-2002, 11:12 AM
Use secure telnet and do it from the command line. You have to request special permission from HR via a TT to do this.

Trazx
03-12-2002, 01:21 PM
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?

eporue
03-12-2002, 08:06 PM
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.

Trazx
03-13-2002, 09:54 PM
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?

eporue
03-14-2002, 01:18 AM
It is no >, but < ......

The syntax is:

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

Trazx
03-14-2002, 07:48 PM
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.