simple function to export mysql database (.sql file)