Re: [PHP-DB] mysqldump
I wonder if you need to specify the full pathname for mysqldump - when it's being executed by a script it may not know where mysqldump is, whereas if you execute it yourself your PATH tells it where to go, which might be why it works under that circumstance. HTH, David. On 10/11/2004, at 6:59 AM, Aaron Todd wrote: I have created a PHP script that looks like: ?php $filename = /var/www/html/db_backup_ . date(n-j-y)..sql; exec('mysqldump -u * -p* database $filename'); ? For some reason this doesnt work and I cant figure out why. There is no error that comes back. When I run the mysqldump command from the server console it produces the file fine. I have read a few other posts out there about this same thing which resulted in the location the file was being saved. But I have gone through my server and found nothing. Does anyone have any suggestions for regarding this. Thanks, Aaron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mysqldump
also ... I notice you have a space after the -u - should that be there? David. On 10/11/2004, at 6:59 AM, Aaron Todd wrote: I have created a PHP script that looks like: ?php $filename = /var/www/html/db_backup_ . date(n-j-y)..sql; exec('mysqldump -u * -p* database $filename'); ? For some reason this doesnt work and I cant figure out why. There is no error that comes back. When I run the mysqldump command from the server console it produces the file fine. I have read a few other posts out there about this same thing which resulted in the location the file was being saved. But I have gone through my server and found nothing. Does anyone have any suggestions for regarding this. Thanks, Aaron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Book recommendation for using MySQL w. PHP
I'd recommend Welling and Thomson PHP and MySQL Web Development. It's nice and thick and a new (3rd) edition has just come out. David. On 4/11/2004, at 4:22 PM, -{ Rene Brehmer }- wrote: hi gang Any recommendations for a book that goes into depth with the SQL language and specifically MySQL's variant, and especially using that with PHP I don't need a beginner's guide, cuz I've gotten far beyond that on my own, but I need some help at figuring out the more complex possibilities, and how to put them into practical use, with both the PHP commands and the SQL language itself. I'm primarily using MySQL, and want to learn that properly, before I start moving on to PostGres and the others... Any recommendation would be beneficial, thanks alot in advanced :). Christmas is coming up, and my girl wants to know what to give me ... heh :P Rene -- Rene Brehmer aka Metalbunny If your life was a dream, would you wake up from a nightmare, dripping of sweat, hoping it was over? Or would you wake up happy and pleased, ready to take on the day with a smile? http://metalbunny.net/ References, tools, and other useful stuff... Check out the new Metalbunny forums at http://forums.metalbunny.net/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Dr David Orlovich, Senior Lecturer in Botany. Department of Botany, University of Otago, P.O. Box 56, (Courier: 464 Great King Street) Dunedin, New Zealand. Phone: (03) 479 9060 Fax: (03) 479 7583 Web: http://www.botany.otago.ac.nz/ Ecology, Conservation and Biodiversity Research Group: http://www.otago.ac.nz/erg/ Botanical Society of Otago: http://www.botany.otago.ac.nz/bso/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] backing up database with mysqldump
This is what I do (assuming your user is 'root'): /path-to-/mysqldump -uroot -pYOURPASSWORD --opt --all-databases backup.sql Alternatively you can pipe it into another database like so: /path-to-/mysqldump -uroot -pYOURPASSWORD --opt --all-databases | /path-to-/mysql -hIPADDRESS -uroot -pYOURPASSWORD Cheers, David Orlovich On 26/10/2004, at 7:53 AM, Perry, Matthew (Fire Marshal's Office) wrote: How do I provide a password? I have been trying -p password[mypass] mysqldump sampledb ./backup/file.txt -Matt _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 11:24 AM To: Perry, Matthew (Fire Marshal's Office) Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] backing up database with mysqldump MySQLdump is an executable program. From the command line: C:\mysqldump databasename ./path/to/backup/file.sql (or file.txt ) C:\mysqldump --help gives all the options dave Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] 10/25/2004 11:14 AM To: [EMAIL PROTECTED] cc: Subject: [PHP-DB] backing up database with mysqldump I have attempted to follow the documentation for mysqldump both on mysql.com and previous emails to this list server. Unfortunately none of the advice has helped me successfully backup my database. I have been spoiled by phpmyadmin backup procedures and have never had to manually set up a backup system for a local server. From shell what should I enter tot to backup my database called sampdb to a location c:/backups? Everything I have tried spits out an error message. -Matt Dr David Orlovich, Senior Lecturer in Botany. Department of Botany, University of Otago, P.O. Box 56, (Courier: 464 Great King Street) Dunedin, New Zealand. Phone: (03) 479 9060 Fax: (03) 479 7583 Web: http://www.botany.otago.ac.nz/ Ecology, Conservation and Biodiversity Research Group: http://www.otago.ac.nz/erg/ Botanical Society of Otago: http://www.botany.otago.ac.nz/bso/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML question
I think you're just missing some double quotes (which you have to escape). How about something like this: echo tda href=\mailto:;, $row['Email'], \, $row['Email'], /a/td; Cheers, David. On 19/09/2004, at 3:31 PM, Pete Holsberg wrote: I have a database that has an email field. I would like the web page that is created dynamically from this database to have a mailto:; link for each email address but I don't know what to put in the email field. I tried replacing echo td{$row['Email']}/td\n; with echo tda href=mailto:{$row['Email']}{$row['Email']}/a/td\n; but that didn't work. Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Dr David Orlovich, Department of Botany, University of Otago, P.O. Box 56, Dunedin, New Zealand. Phone: +643 479 9060 Fax: +643 479 7583 www: http://www.botany.otago.ac.nz/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PHP use in Federal Govt
Mark, a Google search with .php .gov turns up web pages in US government sites that use php. It's trial and error, but I see government agencies appearing here and there. HTH. David. On 17/07/2004, at 7:57 AM, Galbreath, Mark A wrote: Alls, My division at State is trying to get PHP 5.0 approved for use by developers in the Department, and the Powers That Be are requesting evidence that other Federal agencies/military are using PHP, and the extent of it's use. Anybody have a clue about this? I sure would appreciate some help! tia, Mark -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Dr David Orlovich, Department of Botany, University of Otago, P.O. Box 56, Dunedin, New Zealand. Phone: +643 479 9060 Fax: +643 4769 7583 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] How to take Backup ?
Hi Rinku To dump (backup), I do the following: /usr/local/mysql/bin/mysqldump -uroot -pyourpassword --opt --all-databases ~/backup.sql To restore, I do this: cat ~/backup.sql | /usr/local/mysql/bin/mysql -uroot -pyourpassword If you've dumped your databases in order to install a new version of MySQL, then your restore command won't need to include the -p flag, as the root password won't be set. Once you've restored the backup, go into MySQL and enter: flush privileges; at the prompt to reinstall your root password etc. Hope that helps. Cheers, DavidO. On 2/07/2004, at 4:26 PM, Rinku wrote: I want to take backup for Mysql database. Can any of you tell me how to take Backup and how to Restore it ? Rinku __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com Dr David Orlovich, Senior Lecturer in Botany. Department of Botany, University of Otago, P.O. Box 56, (Courier: 464 Great King Street) Dunedin, New Zealand. Phone: (03) 479 9060 Fax: (03) 479 7583 Web: http://www.botany.otago.ac.nz/ Ecology, Conservation and Biodiversity Research Group: http://www.otago.ac.nz/erg/ Botanical Society of Otago: http://www.botany.otago.ac.nz/bso/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php