mysqldump -uuser -ppassword database > file.sql
There is no space between -p
and password
.
Both root and the user found in wp-config.php
, with their respective password, should work.
Actually, mysqldump database > file.sql
should work fine, since the credentials in /root/.my.cnf
would be used to authenticate in MySQL/MariaDB.