One thing Jim didn't mention is that mysqldump is not a mysql client 
command but a standalone executable. Run it from a shell prompt (DOS 
prompt if you are using windows)

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


"Jim Grill" <[EMAIL PROTECTED]> wrote on 09/09/2004 11:47:55 AM:

> >
> > -- 
> > help please
> >
> > please tell me how to extract a script file of a database from mysql
> commandprompt.
> >
> > s.deepak
> >
> >
> > This life is a hard fact; work your way through it boldly, though it 
may
> be adamantine; no matter, the soul is stronger
> >
> > Swami Vivekananda
> >
> 
> Are you looking for mysqldump?? If you want to produce a dump file of a
> table:
> 
> mysqldump -u yourusername -p --add-drop-table dbname tablename >
> tablename.sql
> 
> to do the whole database:
> 
> mysqldump -u yourusername -p --add-drop-table dbname > dbname.sql
> 
> also do "man mysqldump" or see
> http://dev.mysql.com/doc/mysql/en/mysqldump.html
> 
> The "--add-drop-table" will add a "DROP TABLE IF EXISTS tablename" to 
your
> script before creating and populating the tables. This is useful when
> restoring a possibly corrupt table.
> 
> Jim Grill
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 

Reply via email to