Then in qa-config.php you should put a different database. Note that for SSO you need to edit the function qa_get_mysql_user_column_type before you install Q2A. After installation you can edit the other functions, e.g.
qa_get_login_links should return the login/register URLs for your web app
qa_get_logged_in_user should return the details of the currently logged in user. Here you'll need to connect to your separate database or do whatever you need to verify who is logged in.