The tool you speak of already exists: mysqldump
It dumps out to sql, which you can then copy to another machine and re-load.
eg:
on source:
mysqldump -u username -p databasename > dumpfile.sql
Then use ftp/rsync/whatever to move the file to the destination machine, and on there, create an empty database to import into and run:
mysql -u username -p databasename < dumpfile.sql
You'll also need to set up permissions on any users that may have been transferred as well, as they aren't held within the database.
Alternatively, you can copy the files from the mysql data dir - but mysqldump is the easiest/most reliable way.
A note on going windows/linux is that the table names may become case sensitive on linux when they weren't on windows. It depends on the config at both ends. But its worth remembering.