469,945 Members | 2,357 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,945 developers. It's quick & easy.

mysqldump error 1

56
I normally use phpMyAdmin to backup databases, but it would be nice to allow the website owner to just click on a button to back it all up. They don't want to deal with PMA which is probably a good thing, but otherwise I have to do the backups.

I tried this but get the message "Notice: Backup failed: 1 in [path] on line 6 ":
[PHP]<?php
require_once('[path]/dbConnect.php'); // gets user,pass,host
$connector = new dbConnector();
$destination = "[path]/textfile.sql";
$dumpit = 'mysqldump -u ' . $user . ' -p=' . $pass . ' -h ' . $host .' -A -Q -e > ' . $destination;
system($dumpit, $error);
if ($error) { trigger_error('Backup failed: ' . $error); }
?>[/PHP]
I echoed the variables to make sure the paths and commands are okay. Help please?
May 3 '06 #1
0 1836

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Sagar, Sanjeev | last post: by
3 posts views Thread by g00g0 | last post: by
7 posts views Thread by Adam Smith | last post: by
reply views Thread by Adam Smith | last post: by
reply views Thread by mcstayinskool | last post: by
6 posts views Thread by Robert Blackwell | last post: by
6 posts views Thread by Antoni | last post: by
2 posts views Thread by dev2746 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.