The most correct but not always the easiest way is to write a migration tool (in Java for ex.).
And the most primitive way would be to make a plain sql dump from the source database, and adapt it to the target db using massive replacement by patterns (Notepad++ would do nicely). Though this applies only to a basic table/view structure. As soon as you hit the BLOBS or database specific objects (triggers, sequences, etc.) it becomes hell.