You can run an SQL query like
SELECT * INTO OUTFILE 'c:/Temp/result.txt' //path to file
LINES TERMINATED BY '\n'
FROM table_name;
from your normal mysql_query() function for each table, or you can just copy the entire folder within your \mysql\data folder pertaining to the db you want to your server sql folder, if you have access to it.