Take a mysql dump of the existing database:
mysqldump --lock-all-tables -u root -p --all-databases > dump.sql
Copy the dump.sql file to your new mysql server
mysql -u root -p < /tmp/dump.sql
This should export all your data.
For more detailed info: