According to the comments, it is not entirely clear what you want to achieve. Are you trying to create a copy of the database (from scratch) or just copy one table structure to another database?
In any case, I would recommend mysqldump .
If you want to copy all tables, you use:
> mysqldump -d $databaseName > $newFile
In addition, if you want to copy only one table, you can use:
> mysqldump -d $databaseName.$tableName > $newFile
...