Copy my data from a existing db to a new db
Have a look at the mysql_dump dump utility (MySQL docu).

Alternatively you can use the Export function of PhpMyAdmin to generate a SQL file containing all you structure and data.