Back-up Database Query Questions


#1

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

  1. 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


#2

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.sqlThe pipe symbol | is Shift-\ on my keyboard.


#3

thanks haggis, I will try that out…