how to backup a database in mysql code example Example: mysql dump restore mysql -u [user] -p [database_name] < [filename].sql