You do not need Putty for this, but if you do not have any experience it is more convenient to use a graphical application. The same can be done with the "ssh" command, but I never tried it.
So, if you have set up a tunnel, your can access the database directly through the forwarded port. Assuming that both the remote server and your local PC have MySQL running on port 3306 (default and standard), you will have to select a different port to represent the remote dabatase on your own PC. That is why I would set up a tunnel connecting (local) 3307 to (remote) 3306.
BE CAREFUL!
always give the host as something else than "localhost" when using tunnels. "localhost" does NOT mean 127.0.0.1 in MySQL, but makes MySQL use a socket file (on *nix). What's even worse, if you explicitly state an IP port with "localhost", that port is ignored without even a warning. So "mysql -h localhost -P 3307" would connect to your local database through a socket, while "mysql -h 127.0.0.1 -P 3307" would connect to the remote database. Quite a difference!
Code:
mysql_dump remote_db | mysql -h 127.0.0.1:3307 local_db
The above command would exactly do the opposite: dump a database on your local machine (which is called "remote_db") and send it to the remote server to run on a database called "local_db" there.
Please take a good look at the man pages for both mysql_dump and mysql. I do not know if ports can be given direcly in the IP address. there is a separate command-line option to do so (--port, I think also -P, as -p is for a password).
Also, if you did not specify compression for the tunnel, you may do this for the mysql_dump connection (you can do that for the local mysql command as well, but there is little sense in that).
If you can use the MySQL command-line on the remote server, test the whole thing with a small test database first.
Do you want the whole database? I copied a few live databases for development use, but I usually take a good lot of data out first (in the copying process, of course, not removing them from the live system). If you have sufficient knowledge of the remote database, you can copy all "definition" tables completely and only a percentage of the "live data". It is possible to specify separate tables or even queries in mysql_dump.
One final note: if you can do the whole import of data in a transaction, it will greatly speed the import process up.
Good luck!
+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)