Yes it will ask old master password because you are pointing old database. I would like to tell one thing if you are re-installing SSO and point back to old data base this scenerio is not supported at all.It might work but not recommended. Actually if you uninstall the SSO it should delete the database schema as well. Sometime it does not delete because of some issues like network or other.
I was trying to tell just upgrade sso 5.1 to 5.5 then it will not ask old master password.