1. call first db db1
2. call second db db2
3. have table prefix on first db set to prefix1_
4. have table prefix on second db set to prefix2_
5. installed hyperdb plugin from:http://wordpress.org/extend/plugins/hyperdb/
(followed instructions in readme file).