472,142 Members | 1,171 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

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 1866

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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.