Welcome to WebmasterWorld Guest from 54.160.254.203

Forum Moderators: open

Message Too Old, No Replies

400 MB SQL Database Storage

How to tranfer a database to another machine

     
4:36 pm on Jan 2, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:May 11, 2004
posts:130
votes: 0


Hi Sirs/Madam,

I have a problem. I have a 400 MB SQL Database Storage, on my computer. This is huge.

I want to transfer it to my server, in a datbase machine from my Web site. WHAT DO DO?

Please help

Regards,
Dan

4:43 pm on Jan 2, 2006 (gmt 0)

New User

10+ Year Member

joined:Aug 23, 2005
posts:9
votes: 0


Dump it as SQL in a file and compress it. If it's a MySQL database it's easier and a lot faster to do a cold copy of the database files. Personally, I wouldn't trust an answer from a random guy. I would like to read it myself in the manual.
4:53 pm on Jan 2, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 28, 2004
posts:86
votes: 0


If the sql file is 400 MB and then using
mysql < filename.sql
would do the job of importing.
But is it possible to import a zipped file like
mysql < filename.sql.zip
or mysql < filename.tar
?
4:55 pm on Jan 2, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 3, 2003
posts:792
votes: 0


What kind of database is it? (mySql, MS SQL Server, etc.)
5:22 pm on Jan 2, 2006 (gmt 0)

New User

10+ Year Member

joined:Aug 23, 2005
posts:9
votes: 0


anjanesh:
Pipe the output from tar, unzip, gunzip or bunzip2 to mysql. Ie. mysql < gunzip -c database_backup.sql.bz
The -c argument is for:
"-c --stdout --to-stdout
Write output on standard output; keep original files unchanged." - gunzip's manpage.