Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I'm trying to dump an entire database including tables and contents

Status
Not open for further replies.

dunskii

Programmer
Sep 14, 2001
107
AU
Hi All,

I am trying to dump an entire database including tables and contents.

I have loked at the documentation at mysql.com and have ended up using the following code.

mysqldump --opt --databases fjc > fjc_schema2.sql;

I am getting the error:
ERROR 1064: You have an error in your SQL syntax near 'mysqldump --opt --databases fjc > fjc_schema2.sql' at line 1

Any help would be greatly appreciated

Cheers,

DUnskii
 
mysqldump is a program itself, you shouldn't run it from the MySQL prompt. Open a console window and type the command. //Daniel
 
Is this possible when trying it on a windows 2000 platform, I tried and got the error message:

'mysqldump' is not recognized as an internal or external command, operable program or batch file.

dunskii
 
You have to cd to the bin directory under the MySQL installation directory. Like, if you installed MySQL in C:\mysql you would either put in
Code:
c:\mysql\bin\mysqldump YOUR OPTIONS
or
Code:
cd C:\mysql\bin
./mysqldump YOUR OPTIONS
//Daniel
 
Hey Daniel,

Thank you, thank you, thank you. I was trying to figure out mysqldump also but did not know how to run it. I guess this labels me a noob on this subject but it is nice that some people spell it out for us.

- Zych
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top