➥ mysqldump from terminal

If you have an error like this:
mysqldump: [Warnings] Using a password on the command line interface can be insecure.

You can create mysqldump like this:
mysqldump --defaults-extra-file=/path/to/config.cnf

create config.cnf:
user = whatever
password = whatever
host = whatever

Now lets backup a database
mysqldump --defaults-extra-file=/path/to/config.cnf database > /root/export.sql

It's not the best practice because the password is in a file and not encrypted!