Dumping Mysql database using Putty/SSH ?

Status
Not open for further replies.

WebMonster

Active Member
244
2011
32
0
My question is when i dump the database using a command like so

mysql -u forum_for43 -p forum_forum42 < /home/forum/forum_forum427.sql;

I am prompted for the users pass so i put it in and then putty gives no response .

Now i know its dumping the DB because i have had to do it now a second time as the database was too big .

How long should it take for a database of 1.6gb take to dump ?
 
Last edited:
13 comments
you cant dump huge database using putty. I recommend you to use mysqldumper . Becoz i have a bad experience in dumping my 7gb database with putty . And finally got done by mysql dumper. U can hire me if u cant do.
 
I think I remember one of my servers taking around an hour to do it via PuTTy.

Ignore filegrasper. PuTTy is definitely a better way to back up mysql databases. The reason being is that software such as bigdump and mysqldumper experience PHP time outs, unless you've edited your servers files so that PHP don't experience time out requests for x amount of time.
 
I ll take time to dump. So after entering password wait till it responds.

I ll recommend you to take the dump gzipped so that it ll save you space using this

mysqldump -u yourUserName -p yourDBName | gzip >databasebackup.sql.gz
 
I also suggest you use Putty ;)

mysqldump -u username -ppassword database_name > dump.sql

(Yes the -ppassword is written without a space!)
 
you cant dump huge database using putty. I recommend you to use mysqldumper . Becoz i have a bad experience in dumping my 7gb database with putty . And finally got done by mysql dumper. U can hire me if u cant do.

LOLOLOLOLTROLLLLOLOL.
Webmaster, much? :facepalm:

I even dumb my 15GB database using putty, without any problems.

@OP: add --verbose in your command to see if it works.
mysql --verbose --user=XXXXXXXX --password=XXXXXXXX DB_NAME < /PATH/TO/DUMPFILE.SQL
Or, do
mysql --user=XXXXXXXX --password=XXXXXXXX DB_NAME < /PATH/TO/DUMPFILE.SQL &
Note the & at the end! Like this, you can now type
and see if mysqldump is working or not ;)

Also, when I dump my 15GB database, it takes +2h on a shitty VPS.

Cheers & good luck.
 
If you want to restore your db , using this command via Putty.

mysql -uforum_for43 -puser_password forum_forum42 < /home/forum/forum_forum427.sql

Dont use spaces. And depend on your vps/dedi specs, it could take very long time. Just wait until its done. :)
 
i use this for import expot db 250m aprox and works fast


Export

mysqldump -u username -p database_name > dumpfile.sql


Import


mysql -u username -p database_name < dumpfile.sql
 
Thanks everyone . I ended up restoring a slightly older database it was half the size and dumped in seconds . 1 of my tables was 1.gb in size and it seems its corrupt even left over night i left it and it stopped after that table .

Im using a Dell 860 - Intel Xeon X3050 - 4GB MEM - 500GB HDD with centos 5 32 bit OS
 
Status
Not open for further replies.
Back
Top