[Qt-interest] QProcess and mysqldump

David Villalobos Cambronero david.villalobos.c at gmail.com
Thu Nov 18 19:03:56 CET 2010


Thanks for your reply, the exit code of mysqldump is 2.

I change the order of proc->waitForFinished(-1); and correct the password,
and the exit code is still 2

  QStringList arguments;
  arguments << " --user=root";
  arguments << " --password=david123";
  arguments << " --host=localhost";
  arguments << " --result-file=/home/david/tmpDavid.sql";
  proc->setReadChannel(QProcess::StandardOutput);
  proc->start("mysqldump", arguments);
  proc->waitForFinished(-1);


Regards
---
David


On Thu, Nov 18, 2010 at 11:53, Thiago Macieira <thiago at kde.org> wrote:

> On Thursday, 18 de November de 2010 18:37:31 David Villalobos Cambronero
> wrote:
> >   proc->waitForFinished(-1);
> > //  proc->start("mysqldump --user=root --password='david123'
> > --host=localhost test");
> >   proc->start("mysqldump", arguments);
>
> waitForFinished and start are in the wrong order above.
>
> What was the exit code from mysqldump?
>
> Also, are the single-quotes included in your password? If they are not,
> then
> this line is also wrong:
>  arguments << " --password='david123'";
>
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>  Senior Product Manager - Nokia, Qt Development Frameworks
>      PGP/GPG: 0x6EF45358; fingerprint:
>      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101118/c539e192/attachment.html 


More information about the Qt-interest-old mailing list