Problem w/ mysqldump

Victor Subervi victorsubervi at gmail.com
Wed Sep 2 11:44:35 EDT 2009


Not sure how to test it at the command line as you recommend; however, I
most certainly did supply the db name. I most certainly did check the docs.
I also looked at code I had previously written that worked. So I'm stumped!
Is there any way to print it out to screen or (better yet) print to screen
in mysql itself?
TIA,
V

On Wed, Sep 2, 2009 at 10:18 AM, Emile van Sebille <emile at fenx.com> wrote:

> On 9/2/2009 3:43 AM Victor Subervi said...
>
>> Hi:
>> I have the following python code:
>> import os
>> os.system("mysqldump -u root -pPASSWORD --opt spreadsheets > dump.sql")
>>
>
> First, test this at the system command line -- you'll likely get an empty
> file there as well, so calling from within python simply does the same.
>
> Then read the mysqldump docs for the command arguments and supply the
> database name...
>
> Emile
>
>
>  This nicely creates the file...but the file is empty! The database exists
>> and has lots of data, I double-checked it. If there is nothing wrong with
>> my
>> code, is there some way to do the same thing from within MySQL? Can I at
>> least print everything to screen and copy it? Where would I find my
>> database
>> in Windoze?
>> TIA,
>> Victor
>>
>>
> --
>  http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090902/e2bfa62f/attachment-0001.html>


More information about the Python-list mailing list