You will need to export the Gallery database using PHPMyAdmin from the old server, then import it on the new server.
then in the power gallery files, edit the Connections/PowerGalleryConnection.php file to use the correct MySQL connection details to connect to the new database server.