By Rob, 20 June, 2023 Backup database from command line with mysqldump. note mysqldump -u username -p database > backup.sqlthis will ask you for the password for that user for the database after you execute that command.