mysql shell script to export table to database code example Example: how to export db from mysql mysqldump -u username -p dbname > dbexport.sql