dump table and data with mysqldb

Steve Holden sholden at holdenweb.com
Wed Nov 5 13:00:57 EST 2003


"Hoang" <tr at jotsite.com> wrote in message
news:EhYpb.13859$uF5.6372 at newssvr14.news.prodigy.com...
> does anyone know how to dump the table structure and data from a mysql
> database?  I am connected to the database externally so "SELECT * FROM
> database INTO OUTFILE file" doesn't work for me.  However, external tools
> have been able to do it (Mascon).  I presume this might be a common thing
> where people need to backup their databases programatically from MySQLdb.
>

Take a look at

  http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81189

That'll show you how to access the structure, though I don't know if it's
really the sort of thing you want.

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/







More information about the Python-list mailing list