Restore MySQLdump –all-databases to other Debian-install

A backup using fex:

:~# /usr/bin/mysqldump –defaults-file=/etc/mysql/debian.cnf –events –all-databases > all.sql

(It’sĀ supposed to be two -‘es before defaults-file, events and all-databases)

Can be restored easily on a new install using this commands:

:~# scp all.sql user@newserver: # To copy the backup to the new server.

On the new server:
:~# mysql -u root -p < all.sql

Advertisements