Using the mysqldump command username is set using the -u password is set using the -p For both of these you do not leave a space otherwise it will prompt for password mysqldump --single-transaction -u'dbusername' -p'password' dbname | pv > dbname.sql In order to watch the progress of the dump pipe the output of mysqldump to pv then output pv to a file instead of standard out or another pipe. This way you know that the dump is actually doing something and making progress. Use the --single-transaction flag to avoid the need to lock the tables, as the db user may not always have the use of the LOCK command.