View previous topic :: View next topic |
Author |
Message |
sayiklamalar
Joined: 23 Apr 2003 Posts: 5 Location: Turkey
|
Posted: Wed Jul 07, 2004 11:42 pm Post subject: |
|
|
i suppose that my host doesn't supports mysqldump.
however in my local server (apache, mysql 3.23 i think) doesn't supports it too. i couldn't run the script on my computer locally.
mysqldump is not in mysql/bin directory. i download phpdev5 which contains mysql 4. but i can't find mysqldump in it too.
well god don't wants me to use this script.
thanks anyway |
|
Back to top |
|
 |
salenjak
Joined: 02 Mar 2004 Posts: 13
|
Posted: Mon Sep 27, 2004 6:07 pm Post subject: |
|
|
hey there,
I used this code once, and it worked great.. I just wanted to do it again, and my file has 0 bytes?!?!?! ... any idea?
thanx a lot!
saL |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 323
|
Posted: Mon Sep 27, 2004 6:41 pm Post subject: |
|
|
I can't see any reason why it should fail unless your host has changed something on the server eg where mysqldump program is kept.
Try the alternative method in http://cafelog.com/board/viewtopic.php?p=22488#22488 but do read the warning in that posting.
If that doesn't work try a test. Change the line
to Code: | exec("$cmd 2>&1", $sql); | This will then put everything on screen including error messages and see if you can decipher it to see what's happening. |
|
Back to top |
|
 |
salenjak
Joined: 02 Mar 2004 Posts: 13
|
Posted: Mon Sep 27, 2004 6:59 pm Post subject: |
|
|
ok, I changed the mysqldump path, and now I get this error -"/usr/local/bin/mysqldump: Can't set the compatible mode (error Query was empty)"
any idea?
saL |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 323
|
Posted: Mon Sep 27, 2004 8:21 pm Post subject: |
|
|
Ask your host if they have made any changes to MySQL since you last successfully backed up. I suppose you could try replacing
Code: | $cmd = "/usr/bin/mysqldump -q -u $dbusername -p$dbpassword -h $dbhost $dbname"; | by
Code: | $cmd = "/usr/bin/mysqldump --compatible=mysql40 -q -u $dbusername -p$dbpassword -h $dbhost $dbname"; | to force compatibility of output, but I'm not hopeful here. |
|
Back to top |
|
 |
salenjak
Joined: 02 Mar 2004 Posts: 13
|
Posted: Mon Sep 27, 2004 10:57 pm Post subject: |
|
|
I just figured that my DB is hosted on other server... I belive that could be the problem.. I'll let you know ...
thanx for all your help!
saL |
|
Back to top |
|
 |
|