downloading database help

downloading database help

Posted by: thomasalan
Posted on: 2009-08-30 14:34:00

i can't download my database from phpadmin anymore it just freezes up cause my database is too big, i have been trying to learn winscp client, im confused i ask dreamhost support what info to put in it and they give me info for the file server im on, where can i get info on how to connect to my mysql server it's called bang is all the info i could find on it in my client area? i have had some support threads with dreamhost support but they just point my to a wiki that doesnt really have tell me what info i need to connect to the bang mysql server with winscp client so i can just download the database. could someone please educate me on how to do this?

Re: downloading database help

Posted by: thomasalan
Posted on: 2009-08-30 15:14:00

i made some progress with this, i see now i don't need to connect to a mysql server i do need to connect to the file server. i entered this changeing all the following info:
username password yourMySQLHostname dbname
the file in my root directory is output.sql now when i enter the command should i change output to the name of my database? or should i just leave it, does it matter?
If i manually rename a .sql file does it still work?

mysqldump --opt --user=username --password=password --host=yourMySQLHostname dbname > output.sql

Edited by thomasalan on 08/30/09 03:55 PM (server time).

Re: downloading database help

Posted by: sdayman
Posted on: 2009-08-30 16:41:00

Change the output to ~/output.sql so it ends up in your home directory, no matter where you are when you run the command. You can manually rename a .sql file once dumped.

-Scott

Re: downloading database help

Posted by: sXi
Posted on: 2009-08-31 05:47:00

Create "db_backup" and run from $HOME.

#!/bin/sh
# USAGE: sh db_backup [dbname]

set -e
eml=you@domain.com
sql=sql.domain.com
usr=username
psw=password
pfx=$(date +%y%m%d)
mkdir -p ~/archives
cd ~/archives
echo "SQL Backup of \"$1\" attached" >> msg.txt
mysqldump --opt -u $usr -p$psw -h $sql $1 > SQL_"$1"_$pfx.sql
tar zcf SQL_Backup_"$1"_$pfx.tar.gz *.sql
mutt -s "SQL Backup of \"$1\"" -a SQL_Backup_"$1"_$pfx.tar.gz $eml < msg.txt
rm -rf {*.sql,msg.txt}
exit

Prepend # to the mutt line if you don't want it to be emailed to you.




How To Install PHP.INI / ionCube on DreamHost

Tags: phpadminmysql serverfile serverwiki