I wrote this simple php script and uploaded to my old server, and browsed the page, it backed up my db and placed it on my webroot.------$results = exec('mysqldump -uUserName --pPassword dbname > --dbname.sql');
---?>
MySQL Db backups using PHP script
Yesterday, i was transferring one of my php/mysql site to another hosts, at the time of migration i found that i forgot the control panel password, but luckily my ftp password were working. So i could transfer my files to the new server but then i face problem transferring the mysql database, as i don't have the PC/PhpMyAdmin access, i was thinking its impossible, latter i found that its very simple to take the db backup with a small php scripts. I am posting it here so that it can be helpful to others if ever needed.
Subscribe to:
Post Comments (Atom)

Excellent pieces. Keep posting such kind of information on your blog. I really impressed by your blog.
ReplyDelete