Backup database with mysqldump
Prerequisites
PHP with safe_mode disabled (when safe mode is enabled, you can only execute files within the safe_mode_exec_dir).
$db_user = 'db_user';
$db_host = 'localhost';
$db_password = 'db_password';
$db_name = 'db_name';
// creating a file name with the current date and time
$file_name = $db_name.'_'.date('ymdhis').'.sql';
// writing to the file
exec("mysqldump --host='$db_host' --add-drop-table --user='$db_user' --password='$db_password' $db_name > $file_name");
Latest news
- - S5 Slide Show System: PowerPoint on Linux
- - µTorrent for Linux
- - Linux audio tagger
- - Gnome 3 release date - interview with Stormy Peters
- - Ubuntu Maverick Meerkat Beta Released
- - Ubuntu Maverick Meerkat frozen
- - Tab Candy for Firefox
- - Ubuntu font launched for beta testing
- - Interview with Richard Stallman
- - Linux Mint 9 KDE released
- - Gnome 3 release date delayed to march 2011