hno Posted February 13, 2010 Share Posted February 13, 2010 HI I have written this script to geting back up from data base and save it in a file : ob_start(); $db=mysqli_connect("localhost","root","","php"); $tableName = 'user'; $backupFile = 'b/user.sql'; $query= "SELECT * INTO OUTFILE '$backupFile' FROM $tableName"; $result = mysql_query($query); echo mysqli_connect_error() ; if ($result) echo "success"; it is not working what is the problem ? thanks Quote Link to comment https://forums.phpfreaks.com/topic/191941-prblem-with-geting-back-up-from-db/ Share on other sites More sharing options...
cags Posted February 13, 2010 Share Posted February 13, 2010 Well the main problem I can see is you've not provided us with enough details to help. In what way does it not work, what appears on screen? Does it say success but the file isn't there? Is the file there but empty? Does the screen not say success but has an error message? If so what? Is the screen blank and there's no file? Help us, help you. Quote Link to comment https://forums.phpfreaks.com/topic/191941-prblem-with-geting-back-up-from-db/#findComment-1011725 Share on other sites More sharing options...
bibby Posted February 13, 2010 Share Posted February 13, 2010 db backups are a lot easier from the command line ( using mysqldump ) mysqldump -h host -u user -p passwd db > backup.sql Quote Link to comment https://forums.phpfreaks.com/topic/191941-prblem-with-geting-back-up-from-db/#findComment-1011727 Share on other sites More sharing options...
hno Posted February 15, 2010 Author Share Posted February 15, 2010 Quote db backups are a lot easier from the command line ( using mysqldump ) mysqldump -h host -u user -p passwd db > backup.sql thanks for your reply ,but it runs on command line . I want to make a script that runs by cron job every day and make a backup from database automatically Quote Link to comment https://forums.phpfreaks.com/topic/191941-prblem-with-geting-back-up-from-db/#findComment-1012423 Share on other sites More sharing options...
hno Posted February 15, 2010 Author Share Posted February 15, 2010 Quote Well the main problem I can see is you've not provided us with enough details to help. In what way does it not work, what appears on screen? Does it say success but the file isn't there? Is the file there but empty? Does the screen not say success but has an error message? If so what? Is the screen blank and there's no file? Help us, help you. sorry, it is not say "success" and its not make anything . there is not error message thanks for your reply Quote Link to comment https://forums.phpfreaks.com/topic/191941-prblem-with-geting-back-up-from-db/#findComment-1012425 Share on other sites More sharing options...
hno Posted February 15, 2010 Author Share Posted February 15, 2010 Quote Quote Well the main problem I can see is you've not provided us with enough details to help. In what way does it not work, what appears on screen? Does it say success but the file isn't there? Is the file there but empty? Does the screen not say success but has an error message? If so what? Is the screen blank and there's no file? Help us, help you. sorry, it is not say "success" and its not make anything . there is not error message thanks for your reply please help me , it's very important . have you ran a back up script ? please give me some examples thanks Quote Link to comment https://forums.phpfreaks.com/topic/191941-prblem-with-geting-back-up-from-db/#findComment-1012556 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.