Please see :
http://www.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HInstallingtheX…
(see Install and configure a Relational Database)
http://www.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL
If you have a modified xwiki, then as the first step you have to export your xwiki (while
it is using hsql). You will get a Xar file. After that you configure the xwiki to use
MySql and you have to import the xar file (this will create/populate tables in mysql db).
Hope this helps
Regards
Roopesh