Spread the love

You can create mysqldump like this:

mysqldump --defaults-extra-file=/path/to/config.cnf
Code language: JavaScript (javascript)

create config.cnf:

[client] user = whatever password = whatever host = whatever

Now lets backup a database

mysqldump --defaults-extra-file=/path/to/config.cnf database > /root/export.sql
Code language: JavaScript (javascript)

Facebook Comments Box