Your best option is to use Schema workbench to create the XML for your Cube
Reference
Schema Workbench download
MySQL Jdbc Driver
Most of the time people get a little bit stuck at first using the workbench, i highly recommend that before you use it, put the mysql jdbc driver inside the driver folder. That way the application will be able to connect to your database as soon as you open it for the first time.
After you puted your jdbc-driver-file.jar inside the driver folder:
1- Execute Schema Workbench (.sh on unix/linux based systems)
2- Go to Tools -> Preferences and setup your connection string:
3- Go to File -> Open and open your cube
4- Go to File -> New -> MDX Query
If you want a prettier view of your MDX query using jPivot you can use the bi server for testing.