Problem w/ mysqldump
nitebirdz at sacredchaos.com
Wed Sep 2 14:13:26 CEST 2009
On Wed, Sep 02, 2009 at 06:43:12AM -0400, Victor Subervi wrote:
> I have the following python code:
> import os
> os.system("mysqldump -u root -pPASSWORD --opt spreadsheets > dump.sql")
> 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?
Are you sure the password you entered is correct? I tested the code and
it worked fine for me. However, when I used an incorrect password, it
returned an error and did create an empty file, just as you describe.
More information about the Python-list