Jump to content


Photo

backing up database


  • Please log in to reply
3 replies to this topic

#1 OriginalSunny

OriginalSunny
  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts

Posted 12 February 2006 - 11:02 PM

Hi,
i am having trouble backing up my database. I am using the following command:

mysqldump -u jonny -p jon dvd > dvd.sql;

and it is comming up with the following error:

error 1064 (42000) : You have an error in your sql syntax; check the manual that corresponds to your mysql server version for the right syntax to use ...

Someone please help!!!

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 12 February 2006 - 11:31 PM

You can't run that as a MySQL statement -- you have to run this on the command-line.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 OriginalSunny

OriginalSunny
  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts

Posted 12 February 2006 - 11:42 PM

How do i go about doing that then? Can i save it using a statement? is there another way to save the database and tables??

Sorry but i am fairly new to mysql.

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 13 February 2006 - 12:44 AM

Not cleanly -- you can use SELECT INTO OUTFILE for a table dump, but you'd still have to deal the table SHOW CREATE calls too. That's why mysqldump is such a niftly little script. You should have no trouble running it, and I'm sure PHPMyAdmin has sort sort of interface to it.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users