MySQL 5.5 Release Notes
[+/-]
This section describes how to upgrade MySQL.
Note
In the following discussion, MySQL commands that must be run
using a MySQL account with administrative privileges include
-u on the command line
to specify the MySQL rootroot user. Commands that
require a password for root also include a
-p option. Because -p is
followed by no option value, such commands prompt for the
password. Type the password when prompted and press Enter.
SQL statements can be executed using the
mysql command-line client (connect as
root to ensure that you have the necessary
privileges).
mysqldump --add-drop-table --routines --events --triggers --flush-privileges --all-databases --force -uroot -p > mysql_backup.sql
Furthermore, if you're using Debian linux, then you'll have to copy the password of the old debian-sys-maint user in /etc/mysql/debian.cnf to the new server, or login to mysql as root and replace the old password with the new one.