Documentation for JIRA 4.2. Documentation for other versions of JIRA is available too.
JIRA data can be migrated between databases or database servers.
Import your existing data
and restore your data from the XML backup (NB: use the default directory for your index).If you're upgrading to a new version, see Upgrading JIRA. Otherwise, you can use native database tools to migrate to the new database server. After the database is populated, run $JIRA_INSTALL/bin/config.sh (Linux) or %JIRA_INSTALL%/bin/config.bat (Windows). This opens a GUI tool for changing the database URL settings.
If you don't have GUI access or would prefer to do it via the command line, the file is $JIRA_INSTALL/conf/server.xml. Have a look at Connecting JIRA to a Database.