Backup/Restore Users/Passwords/Privileges
The 'mysql' database contains users/privileges/passwords. So take the dump of mysql database along with other databases

mysqldump [options] --all-databases &gt; all_databases_dump.sql

mysqldump -u root -p mysql user &gt; user_table_dump.sql


These mysql database tables contain grant information

user: User accounts, global privileges, and other non-privilege columns.

db: Database-level privileges.

tables_priv: Table-level privileges.

columns_priv: Column-level privileges.

procs_priv: Stored procedure and function privileges. 

After restoring cross check with 

select Host, user, password from user ;

SHOW GRANTS FOR 'user'@'localhost';