There is a very nice tool called 'mysqldump' which will dump your database
into a textfile filled with SQL statements that can re-create your tables.
You can use that file with the 'mysql' commandline tool to create your tables anywhere
To make a backup:
mysqldump database --add-drop-table >output.txt
To restore a backup:
mysql database <output.txt
Note: Read the mysql manual about mysqldump and database copying.
READ IT.
Don't start trying things out without reading the manual, or you will destroy all your data.