Back-up Database Query Questions

Back-up Database Query Questions

Posted by: Howdy
Posted on: 2005-05-19 09:03:00

I stink at SQL, this is a dumb question but help is greatly appreciated...

what would I type in for the query below?
for example purposes, username = JJ, password = JJ99, hostname = yippie, dbname = message

what would #2 look like as entered into the SQL query, I'm assuming I need to remove some of this but I'm not sure what?
mysqldump --opt -JJ -JJ9 -h yippie message > filename.sql

Also, where do I find the symbol between cat filename.sql and mysql below...
cat filename.sql | mysql

2. From the shell, run this command:
mysqldump --opt -uusername -ppassword -h yourMySQLHostname dbname > filename.sql

To restore your database from a backup:

Take that db dump and do:
cat filename.sql | mysql -uusername -ppassword -h yourMySQLHostname dbname

Re: Back-up Database Query Questions

Posted by: haggis
Posted on: 2005-05-19 09:30:00

I think your hostname is going to be along the lines of
yippie.yourdomain.com, so I'd try something like this for starters

mysqldump --opt -uJJ  -pJJ99 -h yippie.yourdomain.com message > backupname.sql

The pipe symbol | is Shift- on my keyboard.

Re: Back-up Database Query Questions

Posted by: Howdy
Posted on: 2005-05-19 12:37:00

thanks haggis, I will try that out...

Tags: sql querydumb questionmysqldumpdatabase queryhostnameassumingoptappreciatedpasswordhelp