[Qt-interest] QProcess and mysqldump
David Villalobos Cambronero
david.villalobos.c at gmail.com
Thu Nov 18 18:37:31 CET 2010
Hi all,
I've working with QProcess and mysqldump (MySQL backup program), but I can't
get it work, here is myt code:
proc = new QProcess;
connect(proc, SIGNAL(readyReadStandardOutput()), this,
SLOT(readyReadStandardOutputSlot()));
connect(proc, SIGNAL(error(QProcess::ProcessError)), this,
SLOT(errorSlot(QProcess::ProcessError)));
connect(proc, SIGNAL(finished(int,QProcess::ExitStatus)), this,
SLOT(finishedSlot(int,QProcess::ExitStatus)));
QStringList arguments;
// arguments << "--user=" << "root";
// arguments << "--password=" << "'david123'";
// arguments << "--host=" << "localhost";
arguments << " --user=root";
arguments << " --password='david123'";
arguments << " --host=localhost";
arguments << " --result-file=/home/david/tmpDavid.sql";
arguments << "--all-databases";
proc->setReadChannel(QProcess::StandardOutput);
proc->waitForFinished(-1);
// proc->start("mysqldump --user=root --password='david123'
--host=localhost test");
proc->start("mysqldump", arguments);
I can't get the output nor the Result file, any idea? Or mysqldump does not
work well with QProcess.
Regards
---
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101118/9655d521/attachment.html
More information about the Qt-interest-old
mailing list