# Backup and restore database

Command about how to backup mysql database on CentOS

Import an sql into a database file

mysql -u username -p database_name < file_name.sql

Export a database to a sql file

mysqldump -u username -p database_name > file_name.sql