fix database authorization issue. (done by leejy)