there are several options
1) You can use two different files for each of the jdbc connectors.
You can configure in mule-deploy.properties for test environment: config.resources=mule-config.xml,test-jdbc-config.xml And for production environment config.resources=mule-config.xml,prod-jdbc-config.xml
In each of those files you can define your database dependant connector (with the same name), and in mule-config you will reference the connector from your endpoints.
With this approach you will need two different applications for test and prod, because you need these two different mule-deploy.properties files.
Take a look at this docs: http://www.mulesoft.org/documentation/display/current/Deployment+Descriptor
2) You can use a generic jdbc connector referencing a bean where you define the JDBC URL (possible configuring it in a properties file or configuring it as a system property)
3) Create different Spring profiles for defining the beans for JDBC URL as explained here: http://spring.io/blog/2011/02/11/spring-framework-3-1-m1-released/
Regards.