poleposters Posted March 9, 2010 Share Posted March 9, 2010 Hi, I want to export my database without having to go into phpMyAdmin. ie. I want to run a script which will output the database to an SQL file. Is there a way to do this? Quote Link to comment https://forums.phpfreaks.com/topic/194586-how-do-i-use-php-to-backup-mysql-database-to-a-file/ Share on other sites More sharing options...
lupld Posted March 9, 2010 Share Posted March 9, 2010 I would use phpMyAdmin... It's free and easy to use and has the ability to download databases as .sql or .zip files. It's easy to set up (gets easier with each version, but you should still probably find a guide) and is a full featured database tool. Quote Link to comment https://forums.phpfreaks.com/topic/194586-how-do-i-use-php-to-backup-mysql-database-to-a-file/#findComment-1023381 Share on other sites More sharing options...
scarhand Posted March 9, 2010 Share Posted March 9, 2010 phpmyadmin -> export Quote Link to comment https://forums.phpfreaks.com/topic/194586-how-do-i-use-php-to-backup-mysql-database-to-a-file/#findComment-1023384 Share on other sites More sharing options...
scarhand Posted March 9, 2010 Share Posted March 9, 2010 or using Google, the first result: http://davidwalsh.name/backup-mysql-database-php Quote Link to comment https://forums.phpfreaks.com/topic/194586-how-do-i-use-php-to-backup-mysql-database-to-a-file/#findComment-1023401 Share on other sites More sharing options...
gizmola Posted March 9, 2010 Share Posted March 9, 2010 If there is any way you can call mysqldump, that is by far the preferred solution to this problem. If and only if that is not a viable solution would I go to phpMyAdmin or the davidwalsh script. Quote Link to comment https://forums.phpfreaks.com/topic/194586-how-do-i-use-php-to-backup-mysql-database-to-a-file/#findComment-1023408 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.