mysql -u hack -p hacker < backup.sql

'hack' is the user-name
'hacker' is the database name

password is asked interactively.