mysql full backup all databases

mysqldump -u root -p --opt --all-databases -r backup.sql

To do a good BD restore without any problem with character sets use these commands (you can change the default-character-set as you need).

mysql -uroot -p --default-character-set=utf8
mysql> SET names 'utf8';
mysql> SOURCE backup.sql;


Leave a Reply